Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
58263 GT3RS 飞起来@阚 奥运奖牌计数 C++ 通过 1 MS 240 KB 434 2024-12-05 21:16:26

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; }


测评信息: