Skip to content

Commit a1f5ef0

Browse files
committed
[BOJ] 로또 / 실버 2 / 30분
https://www.acmicpc.net/problem/6603
1 parent a58fe7d commit a1f5ef0

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
print()

0 commit comments

Comments
 (0)