1769: PageNumbers
内存限制:128 MB
时间限制:1.000 S
评测方式:文本比较
命题人:
提交:4
解决:1
题目描述
We have a book with N pages, numbered 1 to N. How many times does each digit occur in the page numbers?
You are given an int N. Ouput a int[] with 10 elements, where for all i between 0 and 9, inclusive, the element i will be the number of times digit i occurs when we write down all the numbers between 1 and N, inclusive.
输入
The input contains amount of lines, each line contains a N,N will be between 1 and 1,000,000,000, inclusive.
输出
For each N output a int[] with 10 elements, where for all i between 0 and 9, inclusive, the element i will be the number of times digit i occurs when we write down all the numbers between 1 and N, inclusive.
样例输入 复制
7
19
999
样例输出 复制
0 1 1 1 1 1 1 1 0 0
1 12 2 2 2 2 2 2 2 2
189 300 300 300 300 300 300 300 300 300