diff --git "a/\354\235\264\355\213\260\354\230\210\354\233\220/15649_N\352\263\274M(1).py" "b/\354\235\264\355\213\260\354\230\210\354\233\220/15649_N\352\263\274M(1).py" new file mode 100644 index 0000000..52e4bab --- /dev/null +++ "b/\354\235\264\355\213\260\354\230\210\354\233\220/15649_N\352\263\274M(1).py" @@ -0,0 +1,13 @@ +from itertools import permutations +import sys + +print("1부터 N까지 자연수 중에서 중복 없이 M개 선택") + +n, m = map(int, input().split()) +nums = [i for i in range(1, n+1)] + +p_array = permutations(nums, m) +for i in p_array: + for j in i: + print(j, end = " ") + print()