1 条题解

  • 0
    @ 2022-9-28 15:51:04
    #include <bits/stdc++.h>
    using namespace std;
    int main()
    {
        int n;
        int sumA, sumB, sumC, sumAll;
        int a, b, c;
        cin >> n;
        sumA = sumB = sumC = sumAll = 0;
        for (int i = 1; i <= n; i++)
        {
            cin >> a >> b >> c;
            sumA += a;
            sumB += b;
            sumC += c;
            sumAll += (a + b + c);
        }
        cout << sumA << " " << sumB << " " << sumC << " " << sumAll;
        return 0;
    }
    
    • 1

    信息

    ID
    284
    时间
    1000ms
    内存
    128MiB
    难度
    2
    标签
    (无)
    递交数
    160
    已通过
    94
    上传者