| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 66667 | 刘宇轩 | 阶乘的和 | C++ | Accepted | 1 MS | 276 KB | 232 | 2024-03-09 17:42:36 |
#include<bits/stdc++.h> using namespace std; int d(int n){ int c=1; for(int i=1;i<=n;i++){ c*=i; } return c; } int main(){ int m,s=0; cin>>m; for(int j=1;j<=m;j++){ s+=d(j); } cout<<s; return 0; }