[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.

找出小于2,000,000里面的质数然后求和。

 

不用什么好办法,2000000,这个数不算太大,直接求解。

在能节省空间和时间的地方尽量节省。比如可以使用unsigned long, 就不要使用double。可以使用% 就不要使用库函数fmod。这样都可以节省一些时间的。

欧拉项目第十题

你可能感兴趣的:(project)