#P2026. 阶乘的力量
阶乘的力量
题目描述
请你计算出 。
其中 ! 表示阶乘,定义为 $n! = n \times (n-1) \times (n-2) \times \dots \times 1$。
例如,
输入格式
一个正整数
输出格式
一个正整数 , 表示计算结果。
输入输出样例
3
9
提示
Related
In following contests:
请你计算出 S=1!+2!+3!+⋯+n!。
其中 ! 表示阶乘,定义为 $n! = n \times (n-1) \times (n-2) \times \dots \times 1$。
例如,5!=5×4×3×2×1=120
一个正整数 n(1≤n≤50)
一个正整数 S, 表示计算结果。
3
9
1065<50!<1066
In following contests:
By signing up a NCST Online Judge universal account, you can submit code and join discussions in all online judging services provided by us.