#include<stdio.h> int main(){ int a,b,i,k,c,d,s=0; while(scanf("%d",&k)){ if(k!=0){ while(k--){ scanf("%d",&a); s+=a; } }else{ break; } printf("%d\n3",s); s=0; } return 0; }
Double click to view unformatted code.