The chef was chatting with his friend who was a mathematician.
Chef said "Hi !".

His friend replied that '!' is the symbol of factorial.

Chef had never heard about it and he asked more about it. Then his friend taught him how to calculate the factorial of a number.

Chef loved that But as always he got tired after calculating a few values and asked you to do it for him.

-----Input-----
N : Number of inputs
then N lines with input T

N<10

T<=200

-----Output-----
The result for the corresponding value of T

-----Example-----
Input:
3
5
4
6

Output:
120
24
720

Starter code:

Solutions:
factorials=[1]

for x in range(1,201):
 factorials.append(factorials[x-1]*x)
 
x=int(input())

for x in range(x):
 n=int(input())
 print(factorials[n])

for _ in range(int(input())):
 t=int(input())
 x=1
 for i in range(2,t+1):
  x*=i
  
 print(x)

T=eval(input())
T=int(T)
while T:
 n=eval(input()) 
 total=1
 n=int(n)
 for i in range(1,n+1):
  total=total*i
 print(total)
 T=T-1


import sys

N=201
ans=[1]
i=1
while i < N:
 ans.append(ans[i-1] * i)
 i = i+1

T=int(sys.stdin.readline().strip())
while T > 0:
 n=int(sys.stdin.readline().strip())
 print(ans[n])
 T=T-1;


t = int(input())

def fact(n):
 if n==1:
  return 1
 else:
  return n*fact(n-1)
 
for i in range(0,t):
 n = int(input())
 print(fact(n))


import sys

def Fact(n):
 s = 1
 for i in range(2, n + 1):
  s *= i
 return s

N = int(sys.stdin.readline())

for i in range(N):
 T = int(sys.stdin.readline())
 print(Fact(T))


x = int(input());
for i in range(x):
 p=1;
 m=int(input());
 for j in range(1,m+1):
  p=p*j;
 print(p)



t=eval(input())
t=int(t)
for i in range(0,t):
 n=eval(input())
 n=int(n)
 if n==0:
  n=1
 for j in range(2,n):
  n*=j
 print(n) 


#!/usr/bin/env python

def fact(N):
 P = 1
 for n in range(2, N + 1):
  P *= n
 return P

T = int(input())
for t in range(T):
 N = int(input())
 print(fact(N))



N = int(input())
for i in range(N):
 T = int(input())
 res = 1
 for i in range(T): res *= i+1
 print(res)


def factorial(n):
 fact=1;
 for i in range(1, n+1):
  fact*=i
 return fact


t=int(input())
for c in range(t):
 n=int(input())
 print(factorial(n))