Whats wrong with this code
#include
using namespace std;
int main() {
int t;
cin>>t;
while(t–){
long long n,k, prod1 = 1, prod2 = 1;
cin>>n>>k;
n = n-1;
k = k-1;
k = min(k, n-k);
long long temp = n;
for(int i = 1 ; i<=k; i++){
prod1 *= temp;
prod2 *= i;
temp--;
}
cout<<(prod1/prod2)<<endl;
}
return 0;
}