1 条题解

  • 2
    @ 2026-7-7 9:48:33
    #include <bits/stdc++.h>
    using namespace std;
    int x, y, z, h;
    
    int main() {
    	int n, a, b, c;
    	cin >> n;
    	for (int i = 1; i <= n; i++) {
    		cin >> a >> b >> c;
    		x = x + a;
    		y = y + b;
    		z = z + c;
    	}
    	h = x + y + z;
    	cout << x << " " << y << " " << z << " " << h;
    	return 0;
    }
    
    
    • 1

    信息

    ID
    190
    时间
    1000ms
    内存
    128MiB
    难度
    1
    标签
    递交数
    94
    已通过
    62
    上传者