The sum of the primes below 10 is 17 (2 + 3 + 5 + 7 = 17).
Find the sum of all the primes below two million. The correct answer is twelve digits long: 14xxxxxxxx22
.
For +30 bonus points, your code should complete in under ten seconds.
Small hint: After 3, you can count by twos. ← (hover to reveal)
Big hint: Can there ever be a composite number whose only factors are larger than its square root?
©2017 Graham Mitchell