답안 #165274

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
165274 2019-11-26T10:27:37 Z itiam Košnja (COCI17_kosnja) C++11
50 / 50
86 ms 1684 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;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 380 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
4 Correct 2 ms 376 KB Output is correct
5 Correct 2 ms 252 KB Output is correct
6 Correct 58 ms 1288 KB Output is correct
7 Correct 82 ms 1684 KB Output is correct
8 Correct 59 ms 1288 KB Output is correct
9 Correct 86 ms 1680 KB Output is correct
10 Correct 57 ms 1376 KB Output is correct