Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
158366 袁昊贝 A+B 输入输出练习IV C++ Accepted 4 MS 268 KB 309 2026-08-21 13:13:00

Tests(1/1):


Code:

#include <bits/stdc++.h> using namespace std; int main() { int n; while (cin >> n && n != 0) { int sum = 0; int x; for(int i = 0; i < n; i++) { cin >> x; sum += x; } cout << sum << endl; } return 0; }