Created
April 8, 2015 16:23
-
-
Save trys/d220fd46d284a29b1849 to your computer and use it in GitHub Desktop.
Problem Nine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for ( var a = 1; a < 333; a++ ) { | |
var c = 999; | |
for ( var b = a; b < 666 && b < c; b++ ) { | |
c = 1000 - a - b; | |
if ( ( a * a ) + ( b * b ) === ( c * c ) ) { | |
document.write( a * b * c ); | |
break; | |
} | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment