提交时间:2024-02-01 18:39:38

运行 ID: 39459

#include<iostream> using namespace std; int main() { int n,sum1=0,sum2=0,sum3=0; cin>>n; for(int i=0;i<n;i++){ int num1,num2,num3; cin>>num1>>num2>>num3; sum1+=num1; sum2+=num2; sum3+=num3; } cout<<sum1<<" "<<sum2<<" "<<sum3<<" "<<sum1+sum2+sum3<<endl; return 0; }