Problem 1
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17
Find the sum of all the primes below 2 million.
Problem 2
Which prime, below one million, can be written as the sum of the most consecutive primes?
At prime
folder:
rspec spec/prime_spec.rb
Find the sum of all the primes below 2 million
ruby output/sum_of_all_primes.rb
Check the time find the sum of all the primes below 2 million
time ruby output/sum_of_all_primes.rb
Find prime, below one million, can be written as the sum of the most consecutive primes
ruby output/sum_of_most_consecutive_primes.rb
Check the time find prime, below one million, can be written as the sum of the most consecutive primes
time ruby output/sum_of_most_consecutive_primes.rb