-->
当前位置:首页 > 题库

PROGRAMMING:Factorial calculation

Luz5年前 (2021-05-10)题库382
Input a positive integer n, output n! The value of.
Where n= 1*2*3*…*n。
n! It may be very large, but the range of integers that can be expressed by computer is limited, so it is necessary to use the method of high-precision calculation. Use an array a to represent a large integer a, a [0] represents the bits of a, a [1] represents the ten bits of a, and so on.
Multiplying a by an integer k becomes multiplying every element of array a by K. please pay attention to the corresponding carry.
First, set a to 1, then multiply by 2, multiply by 3, when multiplied by N, we get n! The value of.
###Input format:
The input contains a positive integer n, n < = 1000.
###Output format:
Output n! The exact value of.
###Input example:
```in
ten
```
###Output example:
```out
three million six hundred and twenty-eight thousand and eight hundred
```







answer:If there is no answer, please comment