so3500   7년 전

20라인에서 조건에 NULL을 넣은 이유는 문장 끝까지 갔을때를 생각해서 조건으로 넣었어요.


여러 테스트케이스를 직접 넣어봤는데 잘 되는데 제출만 하면 틀리네요.

근데 어디서 틀렸는지를 잘 모르겠습니다.

scanf printf 쓴 이유는 입출력을 좀더 빠르게 하려고 했어요.

so3500   7년 전

해결했습니다.

17번 라인에 s.size() 가 아니라 s.length()를 써야하네요. 아래는 스택오버플로우 사이트에서 참고한 댓글입니다.

size() is there to be consistent with other STL containers (like vector, map, etc.) and length() is to be consistent with most peoples' intuitive notion of character strings. People usually talk about a word, sentence or paragraph's length, not its size.

댓글을 작성하려면 로그인해야 합니다.