Skip to content

Baekjoon 2161

1. Problem

문제 확인하기

2. Solution

n = int(input())
card = [i for i in range(1, n + 1)]
res = []

while True:
    res.append(card.pop(0))
    if not card:
        break
    card.append(card.pop(0))

print(*res)