已采纳 谭迪元 资深光能 #include <iostream> using namespace std; int main() { int n,x,y,z,a=0,b=0,c=0,sum=0,i; cin>>n; for(i=1;i<=n;i++) { cin>>x>>y>>z; a+=x; b+=y; c+=z; } sum+=a*3+b*2+c; cout<<a<<" "<<b<<" "<<c<<" "<<sum; return 0; }