COCI 2008/2009, Contest #3
Task KEMIJA
Luka is fooling around in chemistry class again! Instead of balancing equations he is writing coded sentences on a piece of paper. Luka modifies every word in a sentence by adding, after each vowel (letters 'a', 'e', 'i', 'o' and 'u'), the letter 'p' and then that same vowel again.
For example, the word "kemija" becomes "kepemipijapa" and the word "paprika" becomes "papapripikapa". The teacher took Luka's paper with the coded sentences and wants to decode them. Write a program that decodes Luka's sentence.
Input
The coded sentence will be given on a single line. The sentence consists only of lowercase letters of the English alphabet and spaces. The words will be separated by exactly one space and there will be no leading or trailing spaces. The total number of characters will be at most 100.
Output
Output the decoded sentence on a single line.
Examples
Inputzepelepenapa papapripikapa Outputzelena paprika |
Inputbapas jepe doposapadnapa opovapa kepemipijapa Outputbas je dosadna ova kemija |
All Submissions
Best Solutions
Point Value: 5
Time Limit: 2.00s
Memory Limit: 32M
Added: Dec 13, 2008
Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3
Comments (Search)
But try both ways and find out?
Edit: The letter "y" is not used in Croatian. (I suppose that's why the Croatians didn't include a clarification here...)