fork download
  1. import java.util.*;
  2. import java.io.*;
  3. public class Main
  4. {
  5.  
  6. /** Creates a new instance of Main */
  7. public Main()
  8. {
  9. }
  10.  
  11. /**
  12.  * @param args the command line arguments
  13.  */
  14. public static void main(String[] args)
  15. {
  16.  
  17. int k,j,i,t,l;
  18. double f;
  19. Scanner input=new Scanner(System.in);
  20. t=input.nextInt();
  21. int arr[]=new int[t];
  22. j=0;
  23. for(i=0;i<t;i++)
  24. {
  25. arr[i]=input.nextInt();
  26. System.out.print("\n");
  27. }
  28. for(k=0;k<=i;k++)
  29. {
  30.  
  31. for(f=1,l=1;l<=arr[k];l++)
  32. {
  33. f=f*l;
  34. }
  35. System.out.println(f);
  36.  
  37. // TODO code application logic here
  38. }
  39. } }
Runtime error #stdin #stdout 0.06s 246144KB
stdin
5
1
2
5
50
100
stdout




1.0
2.0
120.0
3.0414093201713376E64
9.33262154439441E157