💡문제접근

  • combinations을 이용해서 문제를 해결할 수 있었다.

💡코드(메모리 : 30616KB, 시간 : 44ms)

from itertools import combinations

import sys
input = sys.stdin.readline

while True:
    lotto = list(map(int, input().split()))
    if lotto == [0]:
        break
    lotto = lotto[1:]
    for i in combinations(lotto, 6):
        print(*i)
    print()

💡소요시간 : 5m

0개의 댓글

Powered by GraphCDN, the GraphQL CDN