/Project_Euler-Ruby

Solutions to Project Euler problems 10 & 50 (in Ruby)

Primary LanguageRuby

Solutions to Project Euler problems 10 & 50 (in Ruby)

Project Euler 10 "Solved"

Best performing is using Prime.each method

By using my own prime_check method it gave the correct answer but with different performance as shown below.

Sum of all primes below 2000000 is: 142913828922. Solution took: 12 seconds.

Project Euler 50 "still need improvement"

By using my own prime_check method it give an answer that close to correct answer as shown below.

Largest primes below 1000 written as consequtive primes is 963. It consists of 24 primes Solution took: 0 seconds.

Largest primes below 1000000 written as consequtive primes is 997661. It consists of 546 primes Solution took: 4 seconds.