| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 137621 | 吕毅心 | 阶乘的和 | C++ | Accepted | 1 MS | 276 KB | 463 | 2025-11-21 18:06:05 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int s(int m){ int l=1,i; for(i=1;i<=m;i++){ l*=i; } return l; } int main(){ int sum=0,m,n; cin>>n; for(m=1;m<=n;m++){ sum+=s(m); } cout<<sum; return 0; }