2164번

· 백준
코드 from collections import deque num = int(input()) card = deque(i for i in range(1,num+1)) while 1: if len(card) == 1: print(card[0]) break card.popleft() # 제일 위에 있는 카드를 빼주는 과정 card.append(card.popleft()) # 위에 있는 카드를 아래로 보내는 과정