# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
869779 | gutzzy | Go (COCI16_go) | C++14 | 1 ms | 592 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 main(){
int n,k,m,ev,total_ev,max_ev;
total_ev = 0;
max_ev = -1;
string pokemon;
cin >> n;
string maxp = "";
for(int i=0;i<n;i++){
ev = 0;
cin >> pokemon >> k >> m;
while(m>=k){
ev += m/k;
m = m%k + (m/k)*2;
}
if(ev>max_ev){
max_ev = ev;
maxp = pokemon;
}
total_ev += ev;
}
cout << total_ev << endl;
cout << maxp << endl;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |