Catalan number ,one test case

#include
using namespace std;
#define ll long long
ll catalan(ll n,ll k)
{
if(k>n-k)
{
k=n-k;
}
ll res=1;
for(ll i=0;i<k;i++)
{
res*=(n-i);
res/=(i+1);
}
res=(res)/(k+1);
return res;
}
int main()
{
ll n;
cin>>n;
ll ans=catalan(2*n,n);
cout<<ans<<endl;

}

//one test case is failng plz tell me that test case

Use unsigned long long int.

why we use unisgned long int

Unsigned long variables are extended size variables for number storage and stores only positive numbers and hence can accomodate longer ranges of values than long long

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.

I have a doubt ie the range of unsigned long long int is 0 to 18446744073709551615 … but 100th Catalan number is 896519947090131496687170070074100632420837521538745909320 Which is much greater than the range of unsigned long long int ??? So what are we supposed to do ?