loading
open in
main.py
1
2
3
4
5
6
7
8
9
10
prime_sum = [0]*2000002
s = 0
for i in xrange(2, 2000002):
	if prime_sum[i]==0:
		s+= i
		prime_sum[i::i] = [-1]*(2000001//i)
	prime_sum[i] = s

L = int(input("Sum of primes below "))-1
print "is", prime_sum[L]