#T392. 奥运奖牌计数
奥运奖牌计数
Description
At the 2008 Beijing Olympics, athletes from country A participated in final events over n days (1 ≤ n ≤ 17).
Now, we need to tally the number of gold, silver, and bronze medals won by country A, as well as the total number of medals.
The first line of input is the number of days n that country A participated in final events. The subsequent n lines each represent the number of gold, silver, and bronze medals won by the country on a given day.
Output 4 integers: the total number of gold, silver, and bronze medals won by country A, and the total number of medals.
Input Format
The input consists of n + 1 lines. The first line is the number of days n that country A participated in final events. The following n lines each contain the number of gold, silver, and bronze medals won on a given day, separated by spaces.
Output Format
Output one line containing 4 integers: the total number of gold, silver, and bronze medals won by country A, and the total number of medals, separated by spaces.
3
1 0 3
3 1 0
0 3 0
4 4 3 11
译文
CodesOnline