#C9533. Decode Alien Text
Decode Alien Text
Decode Alien Text
You are given an encoded string in an alien language. The string contains alternating letters and single-digit numbers. The task is to decode the string by repeating each letter according to the digit that immediately follows it.
For example, given the string "a3b4c2", the letter 'a' is repeated 3 times, 'b' 4 times, and 'c' 2 times. Hence, the decoded string is "aaabbbbcc".
Input constraints guarantee that the string format is always valid: an alternating sequence of letters and digits (0-9).
Note: All numbers are single-digit (0-9) and there is no spacing between the characters in the input.
inputFormat
The input consists of a single line which contains a non-empty string representing the alien encoded text.
It is guaranteed that the string has even length and follows an alternating format of a letter followed by a single-digit number.
outputFormat
Output the decoded human-readable string by repeating each letter as many times as indicated by the digit following it.
## samplea3b4c2
aaabbbbcc