各位大佬,救救我
查看原帖
各位大佬,救救我
1784838
LHY0909楼主2025/7/3 18:15
#include <bits/stdc++.h>
using namespace std;

int main() {
	int n;
    cin>>n;
    int h=1,h2=0;
    for(int j=1;j<=n;j++){
        h=1;
        for(int i=1;i<=j;i++){
            h*=i;
        }
        h2+=h;
    }
    cout<<h2;
	return 0;
}
2025/7/3 18:15
加载中...