Submission #362551

#TimeUsernameProblemLanguageResultExecution timeMemory
362551Tenis0206Subway (info1cup19_subway)C++11
0 / 100
1 ms380 KiB
#include <iostream> #include <vector> using namespace std; int k; int main() { cin>>k; int nod = 0; int per = 0; // vector<pair<int,int>> rez; while(per<k) { if(per+nod<=k) { per+=nod; // rez.push_back({nod+1,nod}); ++nod; continue; } // rez.push_back({nod+1,k-per}); break; } cout<<nod+1<<'\n'; /* for(auto it : rez) { cout<<it.first-1<<' '<<it.second-1<<'\n'; } */ return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...