#P1009. [NOIP 1998 普及组] 阶乘之和
[NOIP 1998 普及组] 阶乘之和
Description
Compute with arbitrary-precision integers the value ().
Here, ! denotes factorial, defined as . For example, .
Input Format
A positive integer .
Output Format
A positive integer , the result of the computation.
3
9
Hint
【Constraints】
For of the testdata, .
【Additional Notes】
Note: The book “深入浅出基础篇” uses this problem as an example, but its constraint is only , so the code in the book cannot pass this problem.
To pass this problem, please continue studying the Chapter 8 content on arbitrary-precision (“high-precision”) arithmetic.
NOIP 1998 Junior, Problem 2.
Translated by ChatGPT 5
京公网安备 11011102002149号