提交时间:2024-04-20 20:28:23
运行 ID: 45911
#include<iostream> using namespace std; int main() { int n; int jin,yin,tong,sumj=0,sumy=0,sumt=0; cin>>n; int i=1; while(i<=n) { cin>>jin>>yin>>tong; sumj+=jin; sumy+=yin; sumt+=tong; i++; } printf("%d %d %d %d",sumj,sumy,sumt,sumj+sumy+sumt); return 0; }