#C7590. Total Energy Calculation

    ID: 51478 Type: Default 1000ms 256MiB

Total Energy Calculation

Total Energy Calculation

You are given several test cases. Each test case contains two parts:

  • First, a line with two integers, N and C, where N is the number of checkpoints and C is a penalty energy value (which is not used in the calculation).
  • Second, a line with N space-separated integers representing the energy requirement for each checkpoint.

Your task is to compute the total energy required for each test case. Mathematically, for a test case with energy values E1, E2, \dots, EN, the total energy is given by:

$\displaystyle \sum_{i=1}^{N} E_i$

Print the result for each test case on a new line.

inputFormat

The input is read from standard input and has the following format:

T
N1 C1
E1 E2 ... EN1
N2 C2
E1 E2 ... EN2
...

Here, T is the number of test cases. For each test case, the first line contains two integers N and C (the penalty energy, which is not used), and the second line contains N integers representing checkpoint energy values.

outputFormat

For each test case, output one integer, which is the total energy (i.e., the sum of the provided checkpoint energies). Each answer should be on a separate line and printed to standard output.

## sample
2
3 2
4 3 1
4 5
2 8 6 4
8

20

</p>