Skip to content

Instantly share code, notes, and snippets.

@hwiorn
Last active December 17, 2015 00:10
Show Gist options
  • Save hwiorn/5518685 to your computer and use it in GitHub Desktop.
Save hwiorn/5518685 to your computer and use it in GitHub Desktop.
euler 3번 문제
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