Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
138154 袁龙浩 阶乘的和 C++ Wrong Answer 1 MS 268 KB 476 2025-11-23 15:39:23

Tests(0/10):


Code:

#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 sum(int b){ int s=0,a=1; for(int j=b;j>=1;j--){ for(int i=b-1;i>=b;i--){ a=j*i; } s+=a; } cout<<s; return s; } int main(){ int n; cin>>n; sum(n); return 0; }


Run Info:

------Input------
4
------Answer-----
33
------Your output-----
4