//my code for smallfactorial,it's giving correct output in my system but not here..please tell me whats wrong in it???
#include <stdio.h>
#include <stdlib.h>
int fact(int);
int main()
{
int t,n,r;
scanf("%d",&t);
while(t--)
{
r=0;
scanf("%d",&n);
r=fact(n);
printf("%d\n",r);
}
return 0;
}
int fact(int n)
{
if(n==1)
return 1;
else
return(n*fact(n-1));
}