#C13123. Text Transformation Challenge

    ID: 42627 Type: Default 1000ms 256MiB

Text Transformation Challenge

Text Transformation Challenge

This problem requires you to apply a series of text transformations on an input string. The supported transformations include reversing the string, converting all characters to uppercase or lowercase, removing vowels, and counting vowels. The transformations should be applied in the order in which they are provided. If the transformation count_vowels appears, your program must output the number of vowels immediately without applying further transformations. Additionally, if a transformation is applied with a multiplier times, then that transformation should be executed that many times in sequence.

For example, applying reverse followed by uppercase to "hello world" yields "DLROW OLLEH", and applying count_vowels to "hello world" yields 3.

inputFormat

The input consists of three lines:

  1. The first line contains the input string.
  2. The second line contains a comma-separated list of transformation names. The valid transformation names are: reverse, uppercase, lowercase, remove_vowels, and count_vowels.
  3. The third line contains an integer specifying the number of times each transformation (except count_vowels) should be applied.

outputFormat

Output the final transformed string. If the count_vowels transformation is used, output the count (an integer) as a string.

## sample
hello
reverse
1
olleh