Ограничения: время – 1s/2s, память – 32MiB Ввод: input.txt или стандартный ввод Вывод: output.txt или стандартный вывод
Послать решение Blockly Посылки Темы Где Обсудить (0)
Your mission, if you decide to accept it, is to create a picture drawing program. A picture will consist of the alphabetic characters A-Z and spaces.
Your program will get the information for the picture from the input file. This file will contain lines of characters which your program must interpret to draw a picture. Each row of the picture will be described by a series of numbers and characters, where the numbers before a character tell how many times that character will be used. If there are multiple digits in a number before a character, then the number of times to repeat the character is the sum of the digits before that character.
The character '.' (dot) will be used in the input file to represent spaces in the picture. The descriptions for different rows in the picture will be separated by an end of line.
The input file will be terminated by an end of file.
There is no limit to the number of rows in a picture, though no row will contain more than 200 characters.
Sample Input
2X3.1X
13X1.1X
Sample Output
XX X
XXXX X