I am getting wrong answer although i am getting correct output on custom test cases
#include<bits/stdc++.h>
using namespace std;
#define endl “\n”
#define sd(val) scanf("%d",&val)
#define ss(val) scanf("%s",&val)
#define sl(val) scanf("%lld",&val)
#define all(v) v.begin(),v.end()
#define PB push_back
#define MP make_pair
#define FF first
#define SS second
#define ll long long int
#define MOD 1000000007
#define clr(val) memset(val,0,sizeof(val))
#define FIO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
double result(double num,double k)
{
double res=1;
while(k>0)
{
res*=(num/k);
num–;
k–;
}
return res;
}
int main()
{
/#ifndef ONLINE_JUDGE
freopen(“input.txt”, “r”, stdin);
freopen(“output.txt”, “w”, stdout);
#endif/
int t;
cin>>t;
while(t–)
{
double n,k;
cin>>n>>k;
if(n==k)
{
cout<<1<<endl;
continue;
}
double ans=result(n-1,k-1);
cout<<ans<<endl;
}
return 0;
}