提交时间:2024-10-25 15:26:35

运行 ID: 53950

#include<bits/stdc++.h> using namespace std; int main() { int n, sum = 0, jc; cin >> n; for(int i=1;i<=n;i++){ jc = 1; for(int j=1;j<=i;j++){ jc*=j; } sum+=jc; } cout << sum; return 0; }