#C9500. Run-Length Encoding
Run-Length Encoding
Run-Length Encoding
In this problem, you are required to implement the Run-Length Encoding (RLE) algorithm. RLE is a simple form of data compression in which consecutive occurrences of the same character are replaced by that character followed by the number of its occurrences. For example, the string "aaabbbbcaa" should be encoded as "a3b4c1a2".
Your task is to read a single input string from standard input (stdin), perform run-length encoding on it, and output the encoded string to standard output (stdout).
If the input string is empty, print an empty string.
inputFormat
The input consists of a single line containing a non-negative length string. The string may contain both uppercase and lowercase letters.
Note: The input is provided through standard input (stdin).
outputFormat
Output the run-length encoded string on a single line. The output is printed to standard output (stdout).
## sampleaaabbbbcaa
a3b4c1a2