#K9886. Compute Factorials
Compute Factorials
Compute Factorials
You are given a list of non-negative integers. For each integer n, your task is to compute its factorial, which is defined as:
\(n! = 1 \times 2 \times \cdots \times n\) with \(0! = 1\).
It is guaranteed that the input values satisfy \(0 \le n \le 12\). Read the input from stdin and output the results to stdout, each factorial on a new line.
inputFormat
The first line contains a single integer T representing the number of test cases. Each of the next T lines contains one integer \(n\) (where \(0\le n\le 12\)).
outputFormat
For each test case, output the factorial of \(n\) on a separate line.
## sample3
0
5
10
1
120
3628800
</p>