#P1239. 计数器

计数器

Description

A book has nn pages, with page numbers starting from 11. Please find how many times each of the digits 0,1,290,1,2\cdots 9 appears in all page numbers. No page number has leading zeros; for example, when n=1234n=1234, page 55 is not 0005, but just 55.

Input Format

A single positive integer nn, the total number of pages.

Output Format

Output ten lines in total, where the kk-th line is the count of digit k1k-1.

11
1
4
1
1
1
1
1
1
1
1

Hint

For 100%100\% of the testdata, 1n1091 \le n \le 10^9.


2022.7.42022.7.4: Three new groups of Hack\text{Hack} testdata were added.

Translated by ChatGPT 5