#include <cstdio> int main() { int n,m,ans,x; scanf("%d",&m); for(int i=1; i<=m; i++) { ans=0; scanf("%d",&n); for(int j=1; j<=n; j++) { scanf("%d",&x); ans+=x; } printf("%d ",ans); } return 0; }