daily pastebin goal
7%
SHARE
TWEET

Untitled

a guest Jan 22nd, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top