제대로 나왔다면 전부 NO가 아니라 3, 5번째가 YES가 나와야죠.
그리고 system("pause"); 를 하면 안 됩니다.
9012번 - 괄호
@ssangba55
string::operator[] 는 C++11부터 문자열의 끝 인덱스에 대해 널 문자를 반환합니다.
http://en.cppreference.com/w/c...
If pos == size(), a reference to the character with value CharT() (the null character) is returned.
For the first (non-const) version, the behavior is undefined if this character is modified to any value other than CharT() .
댓글을 작성하려면 로그인해야 합니다.
skyinyour 6년 전
VS 2013에서 입력값을 복사해서 실행시키면
이렇게 되버립니다. 저 상태에서 엔터를 한번 더 쳐야하구요..!테스트 케이스 한 개씩 돌려보면 다 맞게 나옵니다.
그냥 넘어가려다가 이렇게 엔터를 더 쳐야하는지, 혹여나 이 문제때문에 틀린건지 잘 모르겠네요 ㅠㅠ