fork download
  1. # your code goes here
  2. a=[1 for i in range(0,1001)]
  3. for i in range(2,1001):
  4. k=2
  5. while i*k<=1000:
  6. a[i*k]=0
  7. k+=1
  8. result=0
  9. for i in range(2,1001):
  10. if a[i]==1:
  11. result+=i
  12. print(result)
Success #stdin #stdout 0.03s 9172KB
stdin
Standard input is empty
stdout
76127