#t56. 统计数字出现次数
统计数字出现次数
Count Digit Occurrences
Problem Background
Corresponding multiple-choice / true-false question: https://ti.luogu.com.cn/problemset/1150
Problem Description
Xiao Yang believes his lucky number is the positive integer (it is guaranteed that ). Xiao Yang wants to know how many times appears among all positive integers from to .
Input Format
The first line contains a positive integer .
The second line contains a positive integer .
Output Format
Output the number of times appears among all positive integers from to .
Sample Input
25
2
Sample Output
9
Sample Explanation
From to , the positive integers in which appears are , for a total of occurrences.
Constraints
For all test data, it is guaranteed that and .