Please check for errors

import java.io.;
class small_factorial
{
public static void main(String args[])throws IOException
{
BufferedReader I=new BufferedReader(new InputStreamReader (System.in));
int i,n,j;
n=Integer.parseInt(I.readLine());
int[] f=new int[n];
int[] x=new int[n];
for (i=0;i<n;i++)
x[i]=Integer.parseInt(I.readLine());
for (i=0;i<n;i++)
{
f[i]=1;
for (j=1;j<=x[i];j++)
f[i]
=j;
}
for (i=0;i<n;i++)
System.out.println(f[i]);
}
}

Please give a link to your solution… and provide a link to the question too. By the way, 20 factorial won’t fit in an integer type. You have to use a string to store the factorial. If you don’t know how to do so, check this.

Hope this helps :wink:.