FCTRL2 - Small factorials
You are asked to calculate factorials of some small positive integers.
Input
An integer t, 1<=t<=100, denoting the number of testcases, followed by t lines, each containing a single integer n, 1<=n<=100.
Output
For each integer n given at input, display a line with the value of n!
Example
4 1 2 5 3
Sample output:
1 2 120 6
hide comments
|
iamdikshith:
2023-02-14 15:41:48
python handles it as the most basic problem! |
|
pavlopare:
2023-01-29 07:23:14
plain C is working here (0.01sec , no special math, no long types)
|
|
aoteki:
2023-01-27 06:14:55
This doesn't work in Prolog. the code works correctly in Codewars for a similar Factorial problem. |
|
himanshuo7:
2022-11-06 18:22:47
Solved using custom string multiplication! |
|
kaala:
2022-05-28 18:36:49
segregaate the multiplication system on a vector or an array.
|
|
oyutommy:
2022-04-24 08:06:16
using long long is not gonna work |
|
nowshadsub15:
2022-01-14 19:12:16
solved in c, used library strrev function but CE was shown, so implemented it in the source code and got AC . |
|
rz_ai:
2022-01-09 15:15:03
Can I use boost multiprecision ?? |
|
hitesh_12345:
2021-12-14 06:22:11
Be careful!!! Use line break at end of each testcase.. |
|
rishi_48:
2021-10-22 07:56:16
For those using Java, use BigInteger Class!! |
Added by: | adrian |
Date: | 2004-05-28 |
Time limit: | 1s |
Source limit: | 2000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All |