Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- status = []
- i = 0
- while (i < 1000):
- status.append(False)
- i = i + 1
- def go_through(student):
- student = student + 1
- length = len(status)/student
- i = 1
- while (i <= length):
- index = i *student -1
- status[index] = not (status[index])
- i = i + 1
- num = int(raw_input("Enter x => "))
- map(go_through, xrange(num))
- print len([n for n in status if n])
Add Comment
Please, Sign In to add comment