Please tell which test case is not satisfied here

#include<bits/stdc++.h>

using namespace std;

long long binomial_coeff(long long n,long long r)
{
r=min(r,n-r);
long long prod=1;
for(long long i=0;i<r;++i)
{
prod*=n-i;
prod/=(i+1);
}
return prod;
}
int main()
{
int T=0;
cin>>T;
long long N=0,K=0;
for(int t=0;t<T;t++)
{
cin>>N;
cin>>K;
cout<<binomial_coeff(N-1, K-1)<<endl;
}
return 0;
}

@goyal431 You need to use bigint() to avoid overflow, long long int isn’t sufficient.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.