This code is working well in my IDE. Why this is showing wrong answer on codechef for problem FCTRL2?

#include<stdio.h>
int main()
{
int t,n, arr[100], fact=1,k;
scanf("%d", &t);
for(n=0; n<t; n++)
{
scanf("%d", &arr[n]);
}

for(n=0; n<t; n++)
{
for(k=1; k<=arr[n]; k++)
{
fact=fact*k;

  }
 printf("%d\n", fact);

fact=1;
}

}