Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
114004 石茂诤 A+B 输入输出练习IV C++ Accepted 4 MS 272 KB 303 2025-03-18 13:50:04

Tests(1/1):


Code:

#include<iostream> using namespace std; int main() { int i = 0,sum = 0,n,a; int arr[100] = {0}; while(1) { cin >> n; sum = 0; if(n == 0) break; else { for(i = 0; i < n;i++) { cin >> a; sum += a; } cout << sum <<endl; } } return 0; }