문제 코드from collections import dequeimport sysinput = sys.stdin.readlineif __name__ == "__main__": n = int(input()) q = deque(range(1, n+1)) while q: if len(q) == 1: print(*q) break q.popleft() q.rotate(-1) 백준 섭종 이슈로 직접 실행은 못하고 gpt에게 물어봤다.그랬더니 다음과 같은 조언을 해줬다.while len(q) > 1: q.popleft() q.append(q.popleft())print(q[0])