Special pythagorean triplet: Difference between revisions
Content deleted Content added
m →brute force (83000 iterations): + delib |
|||
Line 105: | Line 105: | ||
Took 77.664µs |
Took 77.664µs |
||
</pre> |
</pre> |
||
=={{header|jq}}== |
|||
{{works with|jq}} |
|||
'''Works with gojq, the Go implementation of jq''' |
|||
<lang jq>range(1;1000) as $a |
|||
| range($a+1;1000) as $b |
|||
| (1000 - $a - $b) as $c |
|||
| select($a*$a + $b*$b == $c*$c) |
|||
| {$a, $b, $c}</lang> |
|||
{{out}} |
|||
<pre> |
|||
{"a":200,"b":375,"c":425} |
|||
</pre> |
|||
=={{header|Julia}}== |
=={{header|Julia}}== |