알고리즘/백준
백준-2164번(카드2)-python3
nyeongha
2023. 11. 24. 16:04
from collections import deque
d=deque()
for i in range(1,int(input())+1):
d.append(i)
while len(d)!=1:
d.popleft()
k=d.popleft()
d.append(k)
print(d.pop())