Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
143093 潘明泽 A+B 输入输出练习IV C++ Accepted 4 MS 276 KB 259 2026-01-11 18:54:07

Tests(1/1):


Code:

#include<bits/stdc++.h> using namespace std; int a,b,n,k; int main(){ while(1){ a=0; cin>>k; if(k==0)break; for(int j=1;j<=k;j++){ cin>>b; a+=b; } cout<<a<<endl; } }