My code is not able to pass the test cases

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;

}

Hello Vivek, there you were using double and we need to use int or long long int as 64 bits is mentioned.
Pls have a look at this https://ide.codingblocks.com/s/260884
This is your code with some little bit corrections.
I hope it is clear to you. In case it is clear to you pls mark it as resolve and provide the rating as well as feedback so that we can improve ourselves.
In case there is still some confusion pls let me know, I will surely try to help you out.
Thanks :slight_smile:
Happy Coding !!