Submit | All submissions | Best solutions | Back to list |
FUCT_FOR_FACFOR - Factorial formula |
Enter the positive integer n. Calculate and print out n! step by step.
Input
The first line of the input consist of a single integer number t which determines the number of tests.
In each of next t lines will contain only one positive integer n.
Constraints
- 0 < t ≤ 1 000
Output
For each test case print out n! step by step.
Example
Input: 5 0 5 9 -3 1 Output: 0!=1 5!=1*2*3*4*5=120 9!=1*2*3*4*5*6*7*8*9=362880 accept positive integer only! 1!=1
Added by: | khanhvh |
Date: | 2018-07-10 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | C NCSHARP C++ 4.3.2 CPP CPP14 CPP14-CLANG JULIA PYTHON PYPY3 |
Resource: | FPTU Can Tho |