用高精度计算出 S=1!+2!+3!+⋯+n!(n≤50)。
其中 ! 表示阶乘,定义为 n!=n×(n−1)×(n−2)×⋯×1。例如,5!=5×4×3×2×1=120。
一个正整数 n。
一个正整数 S,表示计算结果。
3
9
题目来源:洛谷 P1009
By signing up a YSSSN universal account, you can submit code and join discussions in all online judging services provided by us.