Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
56760 xuxingping 奥运奖牌计数 C++ 通过 0 MS 244 KB 434 2024-11-15 19:26:32

Tests(1/1):


#include<bits/stdc++.h> using namespace std; int main(){ int n,days; int gold,silver,copper; int goldinall=0,silverinall=0,copperinall=0; int medalsinall; cin>>n; days=n; while(n>=1){ cin>>gold>>silver>>copper; goldinall+=gold; silverinall+=silver; copperinall+=copper; medalsinall+=gold+silver+copper; n-=1; } cout<<goldinall<<" "<<silverinall<<" "<<copperinall<<" "<<medalsinall; return 0; }


测评信息: