#include <bits/stdc++.h> using namespace std; int main() { int n, a, b, c, d, e, f; cin >> n >> a >> b >> c; for () {

    }


return 0;

}

1 条评论

  • @ 2026-9-20 21:21:44

    老师用的3个变量统计金、银、铜牌,me是开数组

    #include <bits/stdc++.h>
    using namespace std;
    int a,b,c,sumP;
    int m[3];
    int main() {
        cin.tie(0)->sync_with_stdio(false);
        int n;
        cin>>n;
        while(n--){
            cin>>a>>b>>c;
            sumP+=(a+b+c);
            m[0]+=a;
            m[1]+=b;
            m[2]+=c;
        }
        cout<<m[0]<<" "<<m[1]<<" "<<m[2]<<" "<<sumP;
        return 0;
    }
    
  • 1

信息

ID
284
时间
ms
内存
MiB
难度
显示难度暂无评定
标签
(无)
递交数
243
已通过
144
上传者