Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
33515 | charlotteJ | 奥运奖牌计数 | C++ | Accepted | 1 MS | 244 KB | 276 | 2023-12-10 00:45:28 |
#include<iostream> #include<iomanip> using namespace std; int main(){ int n,j=0,y=0,t=0,sj=0,sy=0,st=0,sum=0; cin>>n; for(int i=1;i<=n;i++){ cin>>j>>y>>t; sj+=j; sy+=y; st+=t; } sum=sj+sy+st; cout<<sj<<" "<<sy<<" "<<st<<" "<<sum; return 0; }