提交时间:2023-12-10 00:45:28
运行 ID: 33515
#include<iostream> #include<iomanip> using namespace std; int main(){ int n,j=0,y=0,t=0,sj=0,sy=0,st=0,sum=0; cin>>n; for(int i=1;i<=n;i++){ cin>>j>>y>>t; sj+=j; sy+=y; st+=t; } sum=sj+sy+st; cout<<sj<<" "<<sy<<" "<<st<<" "<<sum; return 0; }