Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
94275 陈铎文 A+B 输入输出练习IV C++ Accepted 4 MS 272 KB 228 2024-10-20 10:32:24

Tests(1/1):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int n; int b[101]; while(scanf("%d",&n)){ if(n==0) break; int sum=0; for(int i=1;i<=n;i++){ cin>>b[i]; sum+=b[i]; } cout<<sum<<endl; } }