#include using namespace std; int main() { int N, M; while (cin >> N) { for (int i = 0; i < N; i++) { int result = 0; int val; cin >> M; for (int j = 0; j < M; j++) { cin >> val; result += val; } cout << result << endl; } } return 0; }