提交时间:2023-10-26 08:59:43
运行 ID: 29275
#include <iostream> using namespace std; int main() { int n,i,x=0,y=0,z=0; int a[20],b[20],c[20]; cin>>n; for(i=0;i<n;i++) cin>>a[i]>>b[i]>>c[i]; for(i=0;i<n;i++) { x+=a[i]; y+=b[i]; z+=c[i]; } cout<<x<<" "<<y<<" "<<z<<" "<<x+y+z; return 0; }