Make Unreal REAL.
article thumbnail
Level 0. 조건 문자열

 

 

#include <iostream>

using namespace std;

int solution(string ineq, string eq, int n, int m)
{
    if (ineq == "<" && eq == "=")
        return n <= m;
    else if (ineq == "<" && eq == "!")
        return n < m;
    else if (ineq == ">" && eq == "=")
        return n >= m;
    else if (ineq == ">" && eq == "!")
        return n > m;
}

'자료구조 & 알고리즘 > 프로그래머스' 카테고리의 다른 글

Level 2. 점 찍기  (0) 2023.05.29
Level 0. 특별한 이차원 배열 1  (0) 2023.05.28
Level 0. 1로 만들기  (0) 2023.05.26
Level 0. 배열 만들기 5  (0) 2023.05.25
Level 0. 문자 개수 세기  (0) 2023.05.24
profile

Make Unreal REAL.

@diesuki4

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!

검색 태그