Skip to content

Instantly share code, notes, and snippets.

@trys
Created April 8, 2015 16:23
Show Gist options
  • Save trys/d220fd46d284a29b1849 to your computer and use it in GitHub Desktop.
Save trys/d220fd46d284a29b1849 to your computer and use it in GitHub Desktop.
Problem Nine
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