We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 563de51 commit d10c353Copy full SHA for d10c353
1 file changed
live9/test99/문제2/백유진.py
@@ -0,0 +1,12 @@
1
+from itertools import permutations
2
+n, m = map(int, input().split())
3
+arr = list(map(int, input().split()))
4
+
5
+result = []
6
+for p in permutations(arr, m):
7
+ result.append(p)
8
9
+result.sort()
10
11
+for r in result:
12
+ print(*r)
0 commit comments