fork download
  1. import math
  2.  
  3. x = 2
  4. y = x
  5. z = 1
  6. test = 0
  7.  
  8. while x < 1001:
  9. while y < (int) math.sqrt(x):
  10. if x%y == 0:
  11. test = 1
  12. break
  13. if test == 0:
  14. print ('%d -- %d', z, x)
  15. z += 1
  16. x +=1
  17. test = 0
Runtime error #stdin #stdout 0.02s 6352KB
stdin
Standard input is empty
stdout
Standard output is empty