提交时间:2024-01-28 17:19:20

运行 ID: 38849

#include<iostream> using namespace std; int main() { int n,gold,silv,bron,G,S,B,T; G=0; S=0; B=0; cin>>n; while(n--){ cin>>gold>>silv>>bron; G+=gold; S+=silv; B+=bron; } T=G+B+S; cout<<G<<" "<<S<<" "<<B<<" "<<T; return 0; }