Encoding binary numbers
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
A binary number can be encoded into decimal digits by the following counting method.
Input
The input includes lines of a character string representing a binary number. The length of a binary number in each line is between 1 and 100 inclusive. The line containing only zero (0) indicates the end of the input. The last line must not be encoded into decimal digits. The input may contain up to 1000 lines.
Output
Print out in each line the decimal digits corresponding to the binary number. There is no space between digits.
Examples
Input #1
Answer #1
Submissions 209
Acceptance rate 72%