Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
89672 黄睿杰 阶乘的和 C++ Accepted 1 MS 272 KB 276 2024-08-28 18:37:22

Tests(10/10):


Code:

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