Problem Code: FCTRL2


int main()
int t,i,j,n[100];
long f=1;

 for (j=0;j<t;j++)

{ scanf("%d",&n[j]);
{ f*=i;



return 0;

Whats Wrong With this ?I am getting time limit exceeded Error

maximum time for problem is 0.23 ms and your program runs more than the allocated time.
and analyse the constraints properly input can be <= 100. if input is 100 and 100! is of 158 digits none of the c data type supports 158 digits.

1 Like

You have to use an array to output such a huge number.even long long int has a range of 10^18.