Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
459 邓小龙 [在线测评解答教程] 求和 C++ Wrong Answer 0 MS 244 KB 350 2022-08-20 15:42:40

Tests(0/10):


Code:

#include <iostream> #include <cstring> using namespace std; int main() { int n1[50],n2[50],sum=0,i=0; while(cin>>n1[i]){ if(n1[i]==EOF){ break; } for(int j=1;j<=n1[i];j++){ n2[i]+=j; } } for(int j=1;j<=i-1;j++){ cout<<n2[j]; } return 0; }


Run Info:

------Input------
887 778 916
------Answer-----
393828 303031 419986
------Your output-----