프로그래머스 181934 조건 문자열

1 개요[ | ]

프로그래머스 181934 조건 문자열

2 C++[ | ]

#include <string>
#include <vector>

using namespace std;

int getAnswer(string ineq, string eq, int n, int m) {
    if(eq=="=" && n==m) return 1;
    if(ineq=="<" && n<m) return 1;
    if(ineq==">" && n>m) return 1;
    return 0;
}

int solution(string ineq, string eq, int n, int m) {
    return getAnswer(ineq, eq, n, m);
}
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}