#T524. 奥运奖牌计数
奥运奖牌计数
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. The output should consist of four 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 by the country on a given day, separated by a space.
Output Format
The output should be a single line containing four integers: the total number of gold, silver, and bronze medals won by country A, and the total number of medals, all separated by spaces.
3
1 0 3
3 1 0
0 3 0
4 4 3 11
## Source
CodesOnline