ural 1150. Page Numbers

1150. Page Numbers

Time limit: 1.0 second
Memory limit: 64 MB
John Smith has decided to number the pages in his notebook from 1 to N. Please, figure out the number of zeros, ones, twos, …, nines he might need.

Input

One number N (1 ≤ N < 109).

Output

Output 10 lines. The first line should contain the number of zeros needed, the second line should contain the number of ones needed, …, the tenth line should contain the number of nines needed.

Sample

inputoutput
12
1
5
2
1
1
1
1
1
1
1
Problem Author: Eugene Bryzgalov 
Problem Source: Ural Collegiate Programming Contest, April 2001, Perm, English Round 
posted @ 2015-10-22 21:48  yanzx6  阅读(235)  评论(0编辑  收藏  举报