def nCm(n,m):
if m==0:
return 1
if m==n:
return 1
return int((n/m)*nCm(n-1,m-1))
num_test=int(input())
for test in range(num_test):
N,K=[s for s in map(int, input().split())]
print(nCm(N-1,K-1))'
Why does it give EOF error?
def nCm(n,m):
if m==0:
return 1
if m==n:
return 1
return int((n/m)*nCm(n-1,m-1))
num_test=int(input())
for test in range(num_test):
N,K=[s for s in map(int, input().split())]
print(nCm(N-1,K-1))'
Why does it give EOF error?