문제 https://www.acmicpc.net/problem/10974 10974번: 모든 순열 N이 주어졌을 때, 1부터 N까지의 수로 이루어진 순열을 사전순으로 출력하는 프로그램을 작성하시오. www.acmicpc.net 코드 n = int(input()) s = [] def dfs(): if len(s) == n: print(' '.join(map(str,s))) return for i in range(1, n+1): if i not in s: s.append(i) dfs() s.pop() dfs() 설명 https://looancheong.tistory.com/147 [파이썬, Python] 백준 15649: N과 M (1) 문제 https://www.acmicpc.net/problem/1564..