Created
January 20, 2013 08:35
-
-
Save dproject21/4577301 to your computer and use it in GitHub Desktop.
プロジェクトオイラー problem9の解答
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
a = 1 | |
while(! (500000 % (1000 - a) == 0)) { | |
a += 1 | |
} | |
b = 1000 * (a - 500) / (a - 1000) | |
c = Math.sqrt(a ** 2 + b ** 2).toInteger() | |
ans = a * b * c | |
println(ans) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment