Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def func(x):
- if x != "*":
- return True
- else:
- return False
- import math
- n = int(input())
- a = [i+1 for i in range (n)]
- p = int(math.log2(n))
- for i in range(p):
- for j in range (0,len(a),2):
- q = int(input())
- if q == 1:
- a[j+1] = "*"
- else:
- a[j] = "*"
- a = list(filter(func, a))
- print(*a)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement