시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 128 MB | 59 | 42 | 35 | 71.429% |
A binary number can be encoded into decimal digits by the following counting method.
Binary number | Counting | Decimal digits |
---|---|---|
000 |
3x0 |
30 |
0111 |
1x0 3x1 |
1031 |
111000001 |
3x1 5x0 1x1 |
315011 |
1010 |
1x1 1x0 1x1 1x0 |
11101110 |
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 1,000 lines.
Print out in each line the decimal digits corresponding to the binary number. There is no space between digits.
111100000011 000 01010101 11 0
416021 30 1011101110111011 21