[BOJ 11341] Eakspay igpay atinlay?

View as PDF

Submit solution

Points: 2
Time limit: 1.0s
Memory limit: 256M

Problem type
Allowed languages
Assembly, Awk, C, C++, Java, Pascal, Perl, Python, Sed, Text

Your job is to translate English phrases into Pig Latin. There are only two rules you need to know. First, for words beginning with a consonant or consonant cluster, you must cut off the consonant or consonant cluster, attach it to the end of the word, and add the letters “a” and “y” at the end of the word. Second, for words beginning with a vowel, you must simply add the letters “y”, “a”, and “y” at the end of the word. We will consider “y” to be a vowel for this problem. You may assume the words will consist of only lower case letters.</p>

The size of each line will be no longer than 200 characters.

입력 형식

Your program must read a list of phrases from standard input (which is preceded by the number of phrases).

출력 형식

Translate the phrases into Pig Latin, and display the translation.

예제 입력

2
twist of fate
hotter than the fourth of july

예제 출력

isttway ofyay atefay
otterhay anthay ethay ourthfay ofyay ulyjay

Comments

There are no comments at the moment.