Special Pythagorean triplet
Problem 009: Special Pythagorean triplet
A Pythagorean triplet is a set of three natural numbers, a < b < c, for which,
a^2 + b^2 = c^2
For example, 3^2 + 4^2 = 9 + 16 = 25 = 5^2.
There exists exactly one Pythagorean triplet for which a + b + c = 1000. Find the product abc.
>20g:*10g:*+:30p0>::*30g-#v_:30p20g10g++ 00g-#v_20g:." ",10g:." ",30g:."=",**.@
>$$ ^ $<
The brute-force approach is here taking quite a long time - but I think it's good enough - perhaps I will make an optimized version later
|Interpreter steps:||1 397 212 134|
|Execution time (BefunExec):||6min 34s (3.54 MHz)|
|Program size:||79 x 7 (fully conform befunge-93)|