Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
38856 chenyifei 奥运奖牌计数 C++ 通过 0 MS 252 KB 309 2024-01-28 17:25:23

Tests(1/1):


#include<bits/stdc++.h> using namespace std; int main() { int n,n1,n2,n3,sum; int gold=0,silver=0,copper=0; cin>>n; for(int i=1;i<=n;i++){ cin>>n1>>n2>>n3; gold+=n1; silver+=n2; copper+=n3; } sum=gold+silver+copper; cout<<gold<<" "<<silver<<" "<<copper<<" "<<sum; return 0; }


测评信息: