#B2058. Olympic Medal Tally
Olympic Medal Tally
Olympic Medal Tally
During the 2008 Beijing Olympics, Country A's athletes participated in \( n \) days of finals. For each day, the numbers of gold, silver, and bronze medals won are provided. Your task is to compute the total number of gold, silver, bronze medals, as well as the total number of medals won across all \( n \) days.
Input Format:
- The first line contains an integer \( n \) \( (1 \le n \le 100) \), representing the number of days.
- Each of the following \( n \) lines contains three non-negative integers (each not exceeding 100) representing the number of gold, silver, and bronze medals won on that day.
Output Format:
- Output four integers separated by spaces: the total number of gold medals, silver medals, bronze medals, and the overall total medals.
inputFormat
The first line contains an integer n (1 ≤ n ≤ 100). Each of the following n lines contains three integers representing the medal counts (gold, silver, bronze) for that day. Each count is between 0 and 100.
outputFormat
Output four integers: the total number of gold medals, silver medals, bronze medals, and the overall total medals (i.e. the sum of gold, silver, and bronze medals).
sample
2
1 0 1
2 1 0
3 1 1 5