fork(2) download
  1. from math import *
  2.  
  3. def ddd():
  4. a, b = map(int, input().strip().split())
  5. for n in range(max(2,a), b+1):
  6. sqrtN = int(sqrt(n) + 1)
  7. isPrime = True
  8. for p in range(2, sqrtN+1):
  9. if n%p == 0:
  10. isPrime = False
  11. break
  12. if isPrime:
  13. print(n)
  14.  
  15. ddd()
Success #stdin #stdout 0.56s 9128KB
stdin
999999999847 999999999947
stdout
999999999847
999999999857
999999999863
999999999877
999999999899
999999999937