반응형
# @Author YoungMinKim
# baekjoon
import sys
from collections import deque
N = int(sys.stdin.readline())
tmp = deque([i for i in range(1,N+1)])
result=[]
while True:
result.append(tmp.popleft())
if len(tmp) == 0:
break
x = tmp.popleft()
tmp.append(x)
[print(i,end=' ') for i in result]
반응형
'백준 문제풀이' 카테고리의 다른 글
baekjoon - python - 1002 (0) | 2020.10.04 |
---|---|
baekjoon - python - 2869 (0) | 2020.10.03 |
baekjoon - python - 1085 (0) | 2020.09.21 |
baekjoon - python - 18258 (0) | 2020.09.20 |
baekjoon - python - 17496 (0) | 2020.09.20 |
댓글