euler/e010.py
Correl Roush 12c5dd7875 Documented each exercise, and placed executable code in a main() function.
git-svn-id: file:///srv/svn/euler@63 e5f4c3ec-3c0c-11df-b522-21efaa4426b5
2010-05-04 18:21:07 +00:00

15 lines
347 B
Python

"""Calculate the sum of all the primes below two million.
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.
Find the sum of all the primes below two million.
"""
from e007 import primes;
def main():
print 'Fetching all primes for n < 2,000,000'
p = primes(0, 2000000)
print 'Sum:', sum(p)
if __name__ == '__main__':
main()