#C3123. Total Distance Covered

    ID: 46516 Type: Default 1000ms 256MiB

Total Distance Covered

Total Distance Covered

You are given several test cases. In each test case, you are provided with the number of days of a hiking trip and the distances covered on each day. Your task is to compute the total distance covered for each test case.

The problem can be formulated mathematically as follows:

\[ S = \sum_{i=1}^{D} d_i \]

where \(D\) is the number of days and \(d_i\) is the distance covered on the \(i^{th}\) day.

Input is provided via standard input (stdin) and output should be sent to standard output (stdout).

inputFormat

The first line contains an integer \(T\) which denotes the number of test cases. Each of the following \(T\) lines describes a test case. Each test case starts with an integer \(D\) indicating the number of days, followed by \(D\) space-separated integers representing the distances covered each day.

Example:

3 10 20 30

This example represents a single test case where \(D = 3\) and the distances are 10, 20, and 30.

outputFormat

For each test case, output the total distance covered on a new line.

Example:

60
## sample
1
3 10 20 30
60