2287: 「一本通 5.3 练习 4」数字计数
Memory Limit:512 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
**原题来自:ZJOI 2010**
给定两个正整数 $a$ 和 $b$,求在 $[a,b]$ 中的所有整数中,每个数码 *(digit)* 各出现了多少次。
Input
仅包含一行两个整数 $a,b$,含义如上所述。
Output
包含一行 $10$ 个整数,分别表示 $0\sim 9$ 在 $[a,b]$ 中出现了多少次。
Sample Input Copy
1 99
Sample Output Copy
9 20 20 20 20 20 20 20 20 20
HINT
数据范围:$30\%$ 的数据中,$1\le a\le b\le 10^6$; $100\%$ 的数据中,$1\le a\le b\le 10^{12}$。