시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 494 233 213 47.439%

문제

도깨비말은 언어 유희 중 하나로, 글자를 특정 법칙에 따라 재구성하는 것을 말한다.

영어권에서는 피그라틴어라는 것이 있다. 주로 어린이들이 많이 쓰는 데, 남들에게 무슨 말인지 모르게 하기 위해 종종 쓴다. 

여기엔 규칙이 있는데, 맨 앞글자가 모음이 아닐때 까지 맨 앞 글자를 어미로 돌린 후 그 끝에 ay를 붙여서 완성한다. 예를 들면 frog는 ogfray이 된다. 만약 맨 앞자음이 없는 apple과 같은 경우는 끝에 ay만 붙여 appleay가 된다. 또는, 단어에 모음이 없는 경우에도 단어의 끝에 ay만 붙인다.

주어진 단어를 피그라틴어로 바꾸는 프로그램을 작성하시오.

입력

한 줄에 하나의 단어씩 주어진다. 그리고 마지막 줄에 #을 입력받고 끝낸다.

주어진 단어는 20자를 넘지 않고 공백없이 소문자로만 이루어져있다. 여기서 모음이란 'a', 'e', 'i', 'o', 'u' 를 말한다.

출력

한 줄에 하나씩 피그라틴어를 출력한다.

예제 입력 1

frog
apple
pear
#

예제 출력 1

ogfray
appleay
earpay

힌트

W3sicHJvYmxlbV9pZCI6IjkyMjYiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWIzYzRcdWFlNjhcdWJlNDRcdWI5ZDAiLCJkZXNjcmlwdGlvbiI6IjxwPlx1YjNjNFx1YWU2OFx1YmU0NFx1YjlkMFx1Yzc0MCBcdWM1YjhcdWM1YjQgXHVjNzIwXHVkNzZjIFx1YzkxMSBcdWQ1NThcdWIwOThcdWI4NWMsIFx1YWUwMFx1Yzc5MFx1Yjk3YyBcdWQyYjlcdWM4MTUgXHViYzk1XHVjZTU5XHVjNWQwIFx1YjUzMFx1Yjc3YyBcdWM3YWNcdWFkNmNcdWMxMzFcdWQ1NThcdWIyOTQgXHVhYzgzXHVjNzQ0IFx1YjlkMFx1ZDU1Y1x1YjJlNC48XC9wPlxyXG5cclxuPHA+X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CJwcm9ibGVtX2xhbmdfY29kZSI6Ilx1YzYwMVx1YzViNCJ9XQ==

출처

ACM-ICPC > Regionals > South Pacific > South Pacific Region > New Zealand Programming Contest > NZPC 2002 A번

  • 빠진 조건을 찾은 사람: cokcjswo
  • 문제를 번역한 사람: joonas