Run ID:41981
提交时间:2022-11-12 14:56:50
#include <cstdio> #include <iostream> #include <cstring> using namespace std; int main(){ int n; while(1){ 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; }