Calculate factorial of a small positive integer n where 1 <= n <= 100.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
def fact(n: int) -> int:
    result = 1
    if n == 1:
        return result
    for i in range(2, n + 1):
        result *= i
    return result
    

def olj():
    try:
        for _ in range(int(input())):
            n = int(input())
            print(fact(n))
    except EOFError:
        return


olj()