from itertools import combinations
n, k = map(int, input().split())
l = [i for i in range(n)]
print(len(list(combinations(l, k))))
이항계수는 조합을 이용하면 됨
'코딩테스트 > Algorithm' 카테고리의 다른 글
[백준 10988] 팰린드롬인지 확인하기 (0) | 2023.06.26 |
---|---|
[백준 2563] 색종이 (0) | 2023.06.26 |
[백준 25304] 영수증 (0) | 2023.06.26 |
[백준 1316] 그룹 단어 체커 (0) | 2023.06.26 |
[백준 2480] 주사위 세개 (0) | 2023.06.25 |