Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
24745 | liusiyu | 奥运奖牌计数 | C++ | Accepted | 0 MS | 244 KB | 257 | 2023-08-17 09:24:38 |
#include<iostream> using namespace std; int main() { int n,jp,yp,tp,jt=0,yt=0,tt=0,sum=0; cin>>n; for(int i=0;i<n;i++){ cin>>jp>>yp>>tp; jt+=jp; yt+=yp; tt+=tp; } sum=jt+yt+tt; cout<<jt<<" "<<yt<<" "<<tt<<" "<<sum; return 0; }