#K74197. Maximum Reward Calculation

    ID: 34144 Type: Default 1000ms 256MiB

Maximum Reward Calculation

Maximum Reward Calculation

In this problem, an employee is given N problems to solve consecutively from the beginning. Each problem has an associated difficulty level. The total reward is calculated by first summing the difficulty levels and then multiplying the sum by the number of problems N.

You are required to compute the reward for each test case using the formula:

\(\text{reward} = \left(\sum_{i=1}^{N} d_i\right) \times N\)

For example, if there are 4 problems with difficulties [2, 3, 2, 5], the reward would be \((2+3+2+5) \times 4 = 12 \times 4 = 48\).

inputFormat

The first line of the input contains an integer T denoting the number of test cases. Each test case is described as follows:

  • The first line contains a single integer N, the number of problems.
  • The second line contains N space-separated integers representing the difficulty levels of the problems.

outputFormat

For each test case, output a single line containing the computed reward.

## sample
1
4
2 3 2 5
48

</p>