회원가입
로그인
Toggle navigation
문제
문제
전체 문제
문제 출처
단계별로 풀어보기
알고리즘 분류
추가된 문제
문제 순위
문제
푼 사람이 한 명인 문제
아무도 못 푼 문제
최근 제출된 문제
최근 풀린 문제
랜덤
출처
ICPC
Olympiad
한국정보올림피아드
한국정보올림피아드시․도지역본선
전국 대학생 프로그래밍 대회 동아리 연합
대학교 대회
카카오 코드 페스티벌
Coder's High
ICPC
Regionals
World Finals
Korea Regional
Africa and the Middle East Regionals
Europe Regionals
Latin America Regionals
North America Regionals
South Pacific Regionals
문제집
대회
채점 현황
게시판
그룹
더 보기
재채점 기록
블로그
도움말
전체
공지
자유
질문
오타/오역/요청
게시판 공지
홍보
업데이트
solved.ac
글쓰기
질문 도움말
자주묻는 질문
반례가 뭐가 있을까요?
4659번 - 비밀번호 발음하기
wlsdn5116
2년 전
0
예외인 경우를 모두 정리했는데 못찾겠습니다.
consonant = {"a","e","i","o","u"} while True: word = input().strip() if word == "end": break con_count, possible = 0, True if not 1<=len(word)<=20 or not word.islower(): possible = False else: for i, w in enumerate(word): if w in consonant: con_count += 1 if i > 2: if w in consonant and word[i - 1] in consonant and word[i - 2] in consonant: possible = False break elif w not in consonant and word[i - 1] not in consonant and word[i - 2] not in consonant: possible = False break if i > 0 and w == word[i - 1]: if w not in {'e','o'}: possible = False break if possible and con_count> 0: print("<{0}> is acceptable.".format(word)) else: print("<{0}> is not acceptable.".format(word))
jyheo98
2년 전
0
14번째 줄 i>=2여야 할거같네요
댓글을 작성하려면
로그인
해야 합니다.
wlsdn5116 2년 전
예외인 경우를 모두 정리했는데 못찾겠습니다.