Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
136480 hjx111 A+B 输入输出练习V C++ Accepted 7 MS 268 KB 340 2025-11-15 11:26:35

Tests(1/1):


Code:

#include <bits/stdc++.h> using namespace std; int main() { int i,j,k,n,s,a[100]; cin>>n; i=0; while (i<n) { cin>>j; k=s=0; while (k<j) { cin>>a[k]; s=s+a[k]; k++; } cout<<s<<endl; i++; } return 0; }