#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