프로그래머스 12918 문자열 다루기 기본

1 개요[ | ]

프로그래머스 12918 문자열 다루기 기본

2 C++[ | ]

#include <string>
#include <vector>

using namespace std;

bool solution(string s) {
    if(s.length() != 4 && s.length() !=6) return false;
    for(const auto& c: s) {
        if(!isdigit(c)) return false;
    }
    return true;
}
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}