Special pythagorean triplet: Difference between revisions

m
Python example
mNo edit summary
m (Python example)
Line 12:
(375, 200, 425)
(200, 375, 425)
</pre>
 
=={{header|Python}}==
<pre>
Python 3.8.8 (default, Apr 13 2021, 15:08:03)
Type "help", "copyright", "credits" or "license" for more information.
>>> [(a, b, c) for a in range(1, 1000) for b in range(1, 1000) for c in range(1000) if a + b + c == 1000 and a*a + b*b == c*c]
[(200, 375, 425), (375, 200, 425)]
</pre>
 
4,108

edits