Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
58263 | 王一涵(吃土豆长大的马铃薯) | 奥运奖牌计数 | C++ | Accepted | 1 MS | 240 KB | 434 | 2024-12-05 21:16:26 |
#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; }