← Back to List

21313번: 문어 ↗

Solutions

Python 3
110 B | 110 chars
n = int(input())

if n % 2 == 0:
    print(*([1, 2] * (n // 2)))
else:
    print(*(([1, 2] * (n // 2)) + [3]))