Submission #869779

#TimeUsernameProblemLanguageResultExecution timeMemory
869779gutzzyGo (COCI16_go)C++14
50 / 50
1 ms592 KiB
#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 timeMemoryGrader output
Fetching results...