Solution for Problem 10 - dhermes/project-euler GitHub Wiki

Problem Statement

Project Euler Problem 10: The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.

Find the sum of all the primes below two million.

Solution

Simply using the Sieve of Eratosthenes, we can find all values and sum them.

Links

Previous