We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a58fe7d commit a1f5ef0Copy full SHA for a1f5ef0
YoonYn9915/implementation/2025-04-19-[백준]-#6603-로또.py
@@ -0,0 +1,22 @@
1
+import sys
2
+from itertools import combinations
3
+
4
+inp = sys.stdin.readline
5
6
+while True:
7
+ arr = list(map(int, inp().split()))
8
9
+ # 0이면 종료
10
+ if arr[0] == 0:
11
+ break
12
+ # 0이 아니면
13
+ K = arr[0]
14
+ # combinations 라이브러리를 사용해 집합 S에서 조합 생성
15
+ answers = combinations(arr[1:K+1], 6)
16
17
+ for answer in answers:
18
+ for num in answer:
19
+ print(num, end=' ')
20
+ print()
21
22
0 commit comments