Run ID:48400

提交时间:2023-05-27 17:09:24

#include <iostream> using namespace std; /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(int argc, char *argv[]) { int N,a; while(cin >> N){ int sum = 0; if(N==0) break; while(N--){ cin >> a; sum += a; } cout << sum << endl; } return 0; }