A Pythagorean triplet is a set of three natural numbers,
for which,
For example,
There exists exactly one Pythagorean triplet for which .
Find the product .
Runtime: 0
Average: 0 Runs: 0
SD: 0 ms
Max: 0
Min: 1000
I use Euclid's formula for generating Pythagorean triples:
,
,
With this, I run a nested set of for loops, each counting up to 25 to test if the sum of my three numbers is 1,000.