Type: Default 1000ms 128MiB

阶乘和

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

用高精度计算出S=1!+2!+3!++n!n50S=1!+2!+3!+…+n!(n≤50),其中“!!”表示阶乘,例如:5!=5×4×3×2×15!=5×4×3×2×1

输入正整数nn,输出计算结果SS

输入

一个正整数nn

输出

计算结果SS

样例

5
153

仲盛周日阶段测试day25_4_6

Not Attended
Status
Done
Rule
OI
Problem
6
Start at
2025-4-6 9:30
End at
2025-4-14 17:30
Duration
200 hour(s)
Host
Partic.
16