提交时间:2024-05-12 20:04:04
运行 ID: 47246
#include<bits/stdc++.h> using namespace std; int main(){ int n,j=0,y=0,t=0,sumj=0,sumy=0,sumt=0,sumjyt=0; cin>>n; for(int i=1;i<=n;i++){ cin>>j>>y>>t; sumj=sumj+j; sumy=sumy+y; sumt=sumt+t; } sumjyt=sumj+sumy+sumt; cout<<sumj<<" "<<sumy<<" "<<sumt<<" "<<sumjyt; return 0; }