Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
41979 | 李竞羽 | A+B 输入输出练习V | C++ | Accepted | 2 MS | 264 KB | 320 | 2022-11-12 14:56:12 |
#include <cstdio> #include <iostream> #include <cstring> using namespace std; int main(){ int n; int m; scanf("%d",&m); while(m--){ scanf("%d",&n); if(n==0) break; int max=0; for(int i=0;i<n;i++){ int temp; scanf("%d",&temp); max+=temp; } printf("%d\n",max); } return 0; }