#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n, x = 1, a = 1, s = 0;
cin >> n;
for (int i = 1; i <= n; i++) {
while (x <= i) {
a = a * x;
x++;
}
s = s + a;
}
cout << s;
return 0;
}
[NOIP1998 普及组] 阶乘之和 看一下哪里错了
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-