Skip to content

Instantly share code, notes, and snippets.

@hwiorn
Last active December 17, 2015 08:48
Show Gist options
  • Save hwiorn/5582328 to your computer and use it in GitHub Desktop.
Save hwiorn/5582328 to your computer and use it in GitHub Desktop.
euler 5번 문제
//소수(<20)의 최대 제곱수(<20)를 모두 곱셈
println((2 to 20).filter(BigInt(_).isProbablePrime(5)).
map(k => (1 to 4).map(math.pow(k, _)).
filter(_ <= 20).max).product.toInt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment