정리용

[백준 1010] 본문

알고리즘/백준

[백준 1010]

무룡룡 2021. 12. 18. 22:47

1. 코드설명

import math
T = int(input())
for _ in range(T):
    n, m = map(intinput().split())
    cnt = math.factorial(m) // (math.factorial(n) * math.factorial(m - n))
    print(cnt)

 

 

2. 주의사항

 

nCm 만 알면 풀수있는 간단한 문제

'알고리즘 > 백준' 카테고리의 다른 글

[백준]  (0) 2021.12.20
[백준 1904] 파이썬 -  (0) 2021.12.19
[백준 14501]  (0) 2021.12.17
[백준 9461] 파이썬 - 파도반 수열  (0) 2021.12.16
[백준 2667] 파이썬 - 단지번호  (0) 2021.12.16
Comments