tj
2025-10-15 22:00:37
发布于:浙江
13阅读
0回复
0点赞
#include <iostream>
using namespace std;
int main() {
int n, h, j;
cin >> n;
h = 0;
for (int i = 1; i <= n; i++) {
j = 1;
for (int b = 1; b <= i; b++) {
j *= b;
}
h += j;
}
cout << h << endl;
return 0;
}
这里空空如也

有帮助,赞一个