#include #define REP(i, n) for (int i = 0; i < (int)(n); i++) using ll = long long; using namespace std; template< int sz > struct FastInput { char buf[sz + 1]; char* o; FastInput() { init(); } void init() { o = buf; buf[fread(buf, sizeof(char), sizeof(char) * sz, stdin)] = '\0'; } int64_t read() { int64_t ret = 0, sign = 1; while(*o && *o <= 32) ++o; if(*o == '-') sign *= -1, ++o; while(*o >= '0' && *o <= '9') { ret *= 10; ret += *o++ - '0'; } return ret * sign; } }; int main() { int T; scanf("%d", &T); string c; REP(_, T) { int N; scanf("%d", &N); int ans = 0; REP(i, N) { int x; cin >> x; ans += x; } cout << ans; } cout << endl; }