Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
142647 傻逼小安 A+B 输入输出练习IV C++ Accepted 1 MS 268 KB 444 2026-01-11 14:58:49

Tests(1/1):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n,a; while(scanf("%d",&n),n){ int sum=0; for(int i=0;i<n;i++){ scanf("%d",&a); sum+=a; } printf("%d\n",sum); } return 0; }