1064:奧運獎牌計數(shù)-信息學(xué)奧賽一本通
#include<algorithm>
#include<cmath>
#include<cstdio>
#include<iostream>
using namespace std;
int main(){
int n,gold=0,silver=0,bronze=0;
cin>>n;
for(int i=1;i<=n;i++){
int g,s,b;
cin>>g>>s>>b;
gold+=g;
silver+=s;
bronze+=b;
}
printf("%d %d %d %d",gold,silver,bronze,gold+silver+bronze);
return 0;
}
標(biāo)簽:信息學(xué)奧賽一本通