// you’re reading...
1 Star2 Stars3 Stars4 Stars5 Stars (11 votes, average: 5.00 out of 5)

Project Euler Solutions

Project Euler 10 Solution

Project Euler 10 Solution

Project Euler 10: Calculate the sum of all the primes below two million

Problem Description

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

Find the sum of all the primes below two million.


Sieve the prime numbers less than 2,000,000 and sum them. Having a fast algorithm to sieve primes helps a solution run under a second.

Project Euler 10
This program and method
solves all test cases for
Project Euler 10 on HackerRank

Project Euler 10 Solution

Runs < 0.090 seconds in Python 2.7.
download arrowUse this link to get the Project Euler 10 Solution Python 2.7 source.


Slowly swipe from either end beginning with the white vertical bar to get an idea of the starting or ending digits. For less drama, just double click the answer area. The distance between the two bars will give you an idea of the magnitude. Touch devices can tap and hold the center of the box between the two bars and choose define to reveal the answer.


Project Euler 10 Solution last updated


No comments yet.

Post a comment