#K91367. Run-Length Decoding

    ID: 37960 Type: Default 1000ms 256MiB

Run-Length Decoding

Run-Length Decoding

You are given a run-length encoded string where each encoded segment consists of a digit followed by a character. The digit indicates how many times to repeat the following character. Your task is to decode the string.

For example, the encoded string 3a2b4c should be decoded to aaabbcccc.

Note: The input string is always in valid format containing pairs of a single digit (0-9) and a character.

inputFormat

A single line input from standard input containing the run-length encoded string. The string consists of alternating digits and characters. For example: 3a2b4c

outputFormat

A single line output to standard output – the decoded string after processing the run-length encoded input.## sample

3a2b4c
aaabbcccc