Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 40121

EOF error but works perfectly with custom input

$
0
0
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?


Viewing all articles
Browse latest Browse all 40121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>