Skip to content

Baekjoon 10974

1. Problem

문제 확인하기

2. Solution

import itertools

N = int(input())
for arr in itertools.permutations(list(i+1 for i in range(N)), N):
    print(*arr)