Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
158039 王垚植 A+B 输入输出练习IV C++ Accepted 5 MS 272 KB 319 2026-08-20 15:30:33

Tests(1/1):


Code:

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