Can someone debug my code, even if the output is correct, the status is wrong

#include <stdio.h>
#include<stdlib.h>
int n;
int factorial( int x );
int main(){
int t,i;
scanf("%d",&t);
for(i=0;i<t;i++){
scanf("%d",&n);
printf("%d\n",factorial(n));
}
return 0;

}
int factorial(int x){
if(x==1 || x==0){
return 1;
}
else {
return x* factorial(x-1);
}
}

Can u send the link to the question ?

your code will not give correct ans for n>13 as integer variable can only store a max of 9 digits

#include <bits/stdc++.h>
#include <boost/multiprecision/cpp_int.hpp>
using namespace boost::multiprecision;
using namespace std;
#define ll long long int
int main() {
// your code goes here
int t;
cin>>t;
while(t–)
{
unsigned long long n;
cpp_int fact=1;
cin>>n;
for(ll i=1;i<=n;i++)
{
fact*=i;
}
cout<<fact<<"\n";

}
return 0;

}

use this

def fact(num):
if num==0 or num==1:
return num
else:
return num*fact(num-1)
num=int(input())