Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. a =[True] * 1001
  2. #True means open false means closed
  3.  
  4. for x in range(2,1001):
  5. for i in range(0,1001):
  6. if (i % x == 0):
  7. if (a[i] == True):
  8. a[i] = False
  9. elif (a[i] == False):
  10. a[i] = True
  11.  
  12. for i in range(0,1001):
  13. if a[i] == False:
  14. print(i)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement