from itertools import combinations
N, M = map(int, input().split())
ls = list(combinations(range(1, N+1), M))
for i in ls:
for j in i:
print(j)
https://www.acmicpc.net/problem/15650
'study > Algorithm' 카테고리의 다른 글
[백준] 파이썬 15663번: N과 M (9) (0) | 2024.03.30 |
---|---|
[백준] 파이썬 25192번: 인사성 밝은 곰곰이 (0) | 2024.03.30 |
[백준] 파이썬 24313 : 알고리즘 수업 - 점근적 표기 1 (0) | 2024.03.30 |
[백준] 파이썬 15649 : N과 M (1) (0) | 2024.03.30 |
[백준] 파이썬 10816 : 숫자 카드 2 (0) | 2024.03.30 |