Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
37372 C++|刘一阳 奥运奖牌计数 C++ 通过 1 MS 248 KB 416 2024-01-20 13:18:48

Tests(1/1):


#include <iostream> using namespace std; int main() { int n; cin>>n; int medals[3]={0}; for (int i=0;i<n;i++) { int g,s,b; cin>>g>>s>>b; medals[0]+=g; medals[1]+=s; medals[2]+=b; } int total=medals[0]+medals[1]+medals[2]; for(int i=0;i<3;i++) { cout<<medals[i]<<" "; } cout<<total<<endl; return 0; }


测评信息: