1 条题解

  • 1
    @ 2026-5-30 11:26:51

    #include using namespace std;

    int main() { int n; cin >> n; int total = 0; int factorial = 1; for (int i = 1; i <= n; i++) { factorial *= i; total += factorial; } cout << total << endl; return 0; }

    • @ 2026-5-31 8:28:48

      在所有的“;”后面回车就行

  • 1

信息

ID
30023
时间
1000ms
内存
256MiB
难度
10
标签
递交数
2
已通过
1
上传者