반응형
https://www.acmicpc.net/problem/1010
bridge = int(input())
def multiply(num, r):
val = 1
for i in range(r):
val *= (num-i)
return val
for i in range(bridge):
b, a = map(int, input().split())
print(int(multiply(a,b)/multiply(b,b)))
nCr해주면 끝!
댓글