영어 원문입니다. 원문의 수식·표를 글자로 옮겨 모양이 다를 수 있습니다. 정확한 내용은 원문 페이지에서 확인하세요. 원문 페이지 열기 (새 창)
Problem
(그림은 원문 저장소에서 볼 수 있습니다)
In a certain book with N pages, the publisher wants to save money by only printing page numbers on the right-hand side, i.e. the odd numbers. Write a program that computes how many digits of each kind are used.
Input
The only line contains the integer N (1 ≤ N ≤ 10^12).
Output
Print a line with 10 integers, the number of digits of each kind. First the number of zeros, then the number of ones, and so on.
Scoring
Your solution will be tested on a set of test groups. To earn points for a group, you must pass all test cases in that group.
| Group | Points | Constraints |
|---|---|---|
| 1 | 60 | N ≤ 10^5 |
| 2 | 40 | No additional constraints. |
Explanation of Sample 1
The page numbers that are printed are 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21 and 23. Thus no zeros are needed, 8 ones, 2 twos, 3 threes, no fours, 2 fives, no sixes, 2 sevens, no eights and 2 nines.
예제
예제 1
23
0 8 2 3 0 2 0 2 0 2
예제 2
306
13 96 65 49 15 46 15 45 15 45
예제 3
82056
12178 25911 17233 25411 17205 25409 17200 25405 13228 20405