Last active
December 17, 2015 00:10
-
-
Save hwiorn/5518685 to your computer and use it in GitHub Desktop.
euler 3번 문제
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
def k(a: Long, s: Long = 2): Long = { | |
if(a < 2) s | |
else if(a % s == 0) k(a / s, s) | |
else k(a, s+1) | |
} | |
println(k(600851475143L)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment