|
|||
Digital ProblemEverything has become cheaper in the Widget Shop, so all the signs that show prices in the shop have to be replaced. You can buy new signs in the Digital Market: you can buy digits from '0' to '9' and you can put together the signs from these digits. Your task is to write a program that calculates how many digits you need from each type. Input SpecificationThe input contains several blocks of test cases. Each case begins with a line containing an integer 1 ≤ n ≤ 1000, the number of signs that you have to install. Each sign contains only one price (an integer between 1 and 1 000 000). The next n lines contain one number each: they describe the prices on the signs. The input is terminated by a block with n = 0. Output SpecificationFor each test case, you have to output 10 integer numbers, separated by spaces. These numbers describe how many digits you need from each type: the first number is the number of 0's you have to buy, the last number is the number of 9's you need. Sample Input
Output for Sample Input
|
|||
University of Debrecen; Faculty of Informatics; v. 03/01/2019 |