#Z15317. 字符串p型编码
字符串p型编码
Description
Given a string str composed entirely of numeric characters ('0', '1', '2', ..., '9'), write the p-type encoded string of str.
For example: The string 122344111 can be described as "1 one, 2 twos, 1 three, 2 fours, 3 ones,"
so we say the p-type encoded string of 122344111 is 1122132431;
Similarly, the encoded string 101 can describe 1111111111; 00000000000 can be described as "11 zeros," so its p-type encoded string is 110;
100200300 can be described as "1 one, 2 zeros, 1 two, 2 zeros, 1 three, 2 zeros," so its p-type encoded string is 112012201320.
Input Format
The input consists of a single line containing the string str. Each string can contain at most 1000 numeric characters.
Output Format
Output the corresponding p-type encoded string of the input string.
122344111
1122132431