1234567891011121314151617181920 |
- #include <iostream>
- 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;
- }
|