Submission #397494

#TimeUsernameProblemLanguageResultExecution timeMemory
397494IwanttobreakfreeGo (COCI16_go)C++98
50 / 50
1 ms208 KiB
#include <iostream> #include <map> using namespace std; int main(){ long long int n,can,cantot,sum=0,maxi=0,cont; string pok,g; cin>>n; while(n--){ cin>>pok; cin>>can>>cantot; cont=0; while(can<=cantot){ cont++; cantot-=can; cantot+=2; } //cout<<pok<<' '<<cont<<'\n'; sum+=cont; if(cont>maxi){ maxi=cont; g=pok; } } cout<<sum<<'\n'; cout<<g; }
#Verdict Execution timeMemoryGrader output
Fetching results...