fork(1) download
  1. from math import sqrt
  2.  
  3. count = 1
  4. i = 1
  5. while count < 3000:
  6. i += 2
  7. for k in range(2, 1+int(sqrt(i+1))): #range(2, i):
  8. if i%k == 0:
  9. break
  10. else:
  11. #print(i) ,
  12. count += 1
  13. #if count%20==0: print ""
  14. print i
Success #stdin #stdout 0.21s 8888KB
stdin
Standard input is empty
stdout
27449