Advertisement
Dimaush

Untitled

Nov 14th, 2024
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. a = list(range(1, 1024 + 1))
  2. nop = 0
  3. while len(a) > 1:
  4.     nop += 1
  5.     if nop % 2 == 1:
  6.         for i in range(len(a) // 2): a.pop(i)
  7.     else:
  8.         for i in range(1, len(a) // 2 + 1): a.pop(i)
  9.     print(len(a), a)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement