#include<iostream> using namespace std; int main(){ int a; cin>>a; while(a){ int b; while(cin>>b){ if(b==0){ break; } else{ int sum = 0; int m; for(int i ...