Skip to content

Instantly share code, notes, and snippets.

@dproject21
Created January 20, 2013 07:20
Show Gist options
  • Save dproject21/4577130 to your computer and use it in GitHub Desktop.
Save dproject21/4577130 to your computer and use it in GitHub Desktop.
プロジェクトオイラー problem7の解答
primeList = [2]
intList = []
for (int i : 3 .. 200000) {
if (i % 2 != 0) {
intList.push(i)
}
}
while(intList.size() != 0) {
primeList.push(intList.first())
intList.removeAll{it % primeList.last() == 0}
}
println(primeList[10000])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment