#include <iostream> using namespace std; int main(){ int n,sum,m,j,k; cin>>m; while(m--){ cin>>n; sum = 0; for(j=0;j<n;j++){ cin>>k; sum+=k; } cout<<sum<<endl; if(m!=0) cout<<endl; } return 0; }