from itertools import 순열, 조합, 곱집합, 중복조합 in python
순열. import permutations -> 순서가 있음 from itertools import permutations n,m=map(int,input().split()) #n=4, m=2 permu=list(permutations([i for i in range(1, n+1) ],m)) # [1,2,3,4], 2 print(permu) ''' for i in permu: for j in range(len(i)): print(i[j], end=' ') print() ''' ''' 입력 : 4 2 출력 : [(1, 2), (1, 3), (1, 4), (2, 1), (2, 3), (2, 4), (3, 1), (3, 2), (3, 4), (4, 1), (4, 2), (4, 3)] 입력 : 3 1 출력 : ..
2021. 11. 2.