// Minimal C++17 contest template. Compile: g++ -std=c++17 -O2 -Wall -Wextra -o sol template.cpp
#include <bits/stdc++.h>
using namespace std;
using ll = long long;

void solve() {
    int n;
    cin >> n;
    vector<ll> a(n);
    for (auto &x : a) cin >> x;
    // Example task: print the sum of the array.
    cout << accumulate(a.begin(), a.end(), 0LL) << '\n';
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int t = 1;
    cin >> t;  // remove this line if the problem has a single test case
    while (t--) solve();
    return 0;
}
