Submission #165274

#TimeUsernameProblemLanguageResultExecution timeMemory
165274itiamKošnja (COCI17_kosnja)C++11
50 / 50
86 ms1684 KiB
#include <iostream> #include <sstream> #include <string> using namespace std; int main(){ int N,X,Y,Z,br; cin >> N; string k=""; for (int i=0;i<N;i++){ if (i!=0) k+="\n"; br=0; cin >> X >> Y; if (Y<X) Z=Y; else Z=X; br=(Z*2)-2; stringstream ss; ss << br; string str = ss.str(); k+=str; //cout << "k: " << k; } cout << k; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...