using namespace std;
int factorial (int temp);
int main()
{
int n,t;
long long int q;
cin>>t;
while(t--)
{
cin>>n;
for(int i=0;i<n;i++)
cin>>q;
int a=factorial(n);
int b=factorial(n-2);
b=b*2;
//if(n!=1)
cout<<(a/b);
//else cout<<1;
}
return 0;
}
int factorial(int temp)
{
int n=2,ans=1;
if(temp<2)
return 1;
while(temp>=n)
{
ans=ans*n;
cout<<"ans="<<ans<<endl;
n++;
}
return ans;
}
why i’m i getting runtime() error???