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