eolymp
bolt
Спробуйте наш новий інтерфейс для відправки розв'язків
Задачі

Encoding binary numbers

Encoding binary numbers

A binary number can be encoded into decimal digits by the following counting method. \InputFile The input includes lines of a character string representing a binary number. The length of a binary number in each line is between \textbf{1} and \textbf{100} inclusive. The line containing only zero (\textbf{0}) indicates the end of the input. The last line must not be encoded into decimal digits. The input may contain up to \textbf{1000} lines. \OutputFile Print out in each line the decimal digits corresponding to the binary number. There is no space between digits.
Ліміт часу 1 секунда
Ліміт використання пам'яті 64 MiB
Вхідні дані #1
111100000011
000
0101010101010101
11
0
Вихідні дані #1
416021
30
10111011101110111011101110111011
21