목차 import collections n = int(input()) q = collections.deque(reversed(range(1, n+1))) while len(q) > 1: q.pop() q.rotate() print(q[0]) 공유하기 게시글 관리 개발 지식 블로그 목차 목차 닫기