# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
208864 | DysonSphere | Go (COCI16_go) | C++14 | 5 ms | 376 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
int ans=0,mx=-1;
string smx;
int main(){
//freopen("in.txt","r",stdin);
//freopen("out.txt","w",stdout);
int t;
cin>>t;
for(int y=0;y<t;y++){
string name;
int evl,cand,cnt=0;
cin>>name>>evl>>cand;
while(cand>=evl){
int modd=cand%evl;
int div=cand/evl;
cand=modd+(div*2);
cnt+=div;
ans+=div;
}
if(cnt>mx){
mx=cnt;
smx=name;
}
}
cout<<ans<<"\n"<<smx;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |