# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
165273 | 2019-11-26T10:27:19 Z | itiam | Košnja (COCI17_kosnja) | Python 3 | 0 ms | 0 KB |
#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; }