favorite We need a little bit of your help to keep things running, click on this banner to learn more

Fire control

Fire control

To control the fire of a long-range artillery mount, radio communication is used. But it occurs in conditions when the enemy creates radio interference, therefore, to ensure the reliability of message transmission (this is an integer from 0 to 1000000) is encrypted as follows: each digit is transmitted, and then immediately repeated so many times what is its meaning. For example, the number "3" is transmitted four times, "0" once, etc. and instead of 103, the message 1103333 is transmitted.

Write a program that would provide such encryption.


Original message - an integer p (0p106).


Print the encrypted message s (0s < 1060).

Time limit 1 seconds
Memory limit 128 MiB
Input example #1
Output example #1
Author Oleksandr Bulanyi
Source 2013 XXVII All - Ukrainian Informatics Competition, Stage II, Dnepropetrovsk, December 28, Problem B