12770 - GEC1506 Factorials
|
Time |
Memory |
| Case 1 |
1 sec |
32 MB |
| Case 2 |
1 sec |
32 MB |
| Case 3 |
1 sec |
32 MB |
| Case 4 |
1 sec |
32 MB |
| Case 5 |
1 sec |
32 MB |
Description
We have introduced the loop and condition concept in our course, you can use these concepts to finish the following task.
Calculate N! = 1×2×...×(N-1)×N.
Note that
- You DO NOT need to consider the number exceed the range of integer or long long data type.
- 0! = 1
Input
A line of text with a number.
Output
A line with the factorial result.
Tags