Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (13 sloc) 217 Bytes
# Problem 7:
# Find the 10001st prime
require "lib/prime"
seed = 0
primes = 0
while (true)
primes += seed.prime? ? 1 : 0
break if primes == 10001
seed += 1
end
puts seed
# Answer: 104743
# Time: 0m8.944s