반응형
# @Author YoungMinKim
# baekjoon
import sys
import math
def combinations_len(p,r):
return math.factorial(p)/(math.factorial(r)*math.factorial(p-r))
for _ in range(int(sys.stdin.readline())):
N,M = map(int,sys.stdin.readline().split())
if N<M:
N,M = M,N
print(int(combinations_len(N,M)))
반응형
'백준 문제풀이' 카테고리의 다른 글
baekjoon - python - 5533 (0) | 2021.01.03 |
---|---|
baekjoon - python - 1009 (0) | 2020.12.29 |
baekjoon - python - 6768 (0) | 2020.12.19 |
baekjoon - python - 5575 (0) | 2020.12.08 |
baekjoon - python - 1297 (0) | 2020.12.07 |
댓글