fork download
  1. import math
  2. M,N=map(int,input().split())
  3. k=0
  4. w=0
  5. while M!=N+1:
  6. i=round(math.sqrt(M))
  7. for q in range (2,i+1):
  8. if M%q==0:
  9. k+=1
  10. if k==0:
  11. w+=1
  12. print(M)
  13. else:
  14. k=0
  15. M+=1
  16. if w==0:
  17. print("Absent")# your code goes here
Success #stdin #stdout 0.02s 9232KB
stdin
4 4
stdout
Absent