Why isnt my code getting AC

#include<iostream>
using namespace std;
#define ll long long
int main() {
	ll n;
	
	cin>>n;

	//while(n--) {
			if(n==0 || n==1){
				cout<<"1"<<endl;
				return 0;
			}
		

		ll i = n+2, j = 1; 
		double ans = 1.0;
		while(i <= (2*n) && j <= n){
			ans = (ans * i)/j;
			i++;
			j++;
		}

		while(i <= (2*n)){
			ans = ans * i;
			i++;
		}

		while(j <= n){
			ans = ans/j;
			j++;
		}

		cout<<(long long)ans<<endl;
//	}
	

	return 0;
}

I wrote a code for this problem and I have matched the output for all test cases given in the soutlion tab sitll my amswer is not getting AC, my code is giving the right output though

@sudipt1999
This is a problem for big integers. Catalan Numbers grow extremely fast. Storing such large integers is not possible in C++.
You have to use either Java BigInteger class or Python to solve this problem. Can’t solve it in C++.

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.