#K4356. Smallest Value After Operations

    ID: 27336 Type: Default 1000ms 256MiB

Smallest Value After Operations

Smallest Value After Operations

You are given several test cases. For each test case, you are given an integer \(N\) and a list of \(N\) integers. You can perform exactly \(N-1\) operations where in each operation you combine two numbers into one by summing them together. No matter the order of operations, the final number will always be the sum of the initial numbers.

Your task is to compute and output the final number (which is the sum of all the integers) for each test case.

inputFormat

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

  • The first line contains an integer \(T\) representing the number of test cases.
  • For each test case, the first line contains an integer \(N\) (the number of integers).
  • The second line contains \(N\) space-separated integers.

outputFormat

For each test case, output the sum of the \(N\) integers on a new line. The output is written to stdout.

## sample
1
3
1 2 3
6

</p>