#K36922. Maximum Problems Solved

    ID: 25862 Type: Default 1000ms 256MiB

Maximum Problems Solved

Maximum Problems Solved

You are given data for T teams. Each team consists of several members, and each member can solve a certain number of problems in a day. Your task is to compute the total number of problems solved by each team in a day by summing the problems solved by each member.

The mathematical formulation is as follows:

For each team i, if there are mi members and each member j solves aij problems, you must compute:

[ S_i = \sum_{j=1}^{m_i} a_{ij} ]

Output the sum Si for each team in the same order as the input.

Input is provided from standard input (stdin) and output should be written to standard output (stdout).

inputFormat

The first line of the input contains an integer T, representing the number of teams.

For each team, there is one line that starts with an integer m (the number of members in the team), followed by m space-separated integers, where each integer represents the number of problems solved by a member.

outputFormat

Output exactly T lines. The i-th line should contain a single integer, which is the total number of problems solved by the i-th team.

## sample
2
3 5 3 4
2 1 2
12

3

</p>