#C6232. Accumulated Race Times
Accumulated Race Times
Accumulated Race Times
In this problem, you are given the race times of several competitors over various stages. Each competitor's times are provided as a sequence of positive integers. Your task is to calculate the total race time for each competitor by summing the stage times.
The input is read from stdin and the output should be printed to stdout. The first line of input contains an integer N, denoting the number of competitors. This is followed by N lines, each containing the stage times (separated by spaces) for a competitor.
The expected output is a single line containing the total race time for each competitor separated by a space.
The summation should be computed using the formula:
\( S_i = \sum_{j=1}^{k_i} t_{ij} \)
where \( S_i \) is the total time for the \( i \)-th competitor and \( t_{ij} \) is the time taken for the \( j \)-th stage, with \( k_i \) stages in total.
inputFormat
Input Format:
- The first line contains an integer N, the number of competitors.
- The next N lines each contain the stage times for a competitor, with each time separated by a space.
Note: The number of times in each line can vary.
outputFormat
Output Format:
- A single line containing N integers separated by a space. Each integer represents the total race time of a competitor.
3
10 15 20
12 18 22
14 20 13
45 52 47