Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
156257 王培臻 阶乘的和 C++ Accepted 1 MS 272 KB 244 2026-06-27 15:16:12

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int cs(int f){ int sc=1; for(int e=1;e<=f;e++){ sc*=e; } return sc; } int main() { long long a,s=0; cin>>a; for(int i=1;i<=a;i++){ s+=cs(i); } cout<<s; return 0; }