MetaOA #7
Cyclic Vowel Shift
Estimated EasyJudge-ready
Topics (AI-labelled)Strings
Cyclically shift the lowercase vowels a, e, i, o, u in the string one position to the right in order of appearance: each vowel moves to the position of the next vowel, and the last one moves to the position of the first. All other characters stay in place. If there are no vowels, output the string unchanged.
Input
A single line of printable ASCII text of length 1..1000, which may contain spaces; only the lowercase aeiou count as vowels.
Output
Output the answer as described; separate multiple results with spaces in order, and output an empty line for an empty array.
Example 1
Input:
codesignal
Output:
cadosegnil
Example 2
Input:
plain text
Output:
plean tixt
Example 3
Input:
xyz
Output:
xyz
Example notes
Example 1: the vowels of codesignal are o, e, i, a in order; after rotating right they become a, o, e, i, and writing them back into the original vowel positions gives cadosegnil. The output must keep all original spaces and end with a newline.
Editorial
Loading solution…