#P1179. [NOIP 2010 普及组] 数字统计
[NOIP 2010 普及组] 数字统计
Description
Count how many times the digit appears among all integers in the given range .
For example, for the range , the digit appears 1 time in the number 2, 1 time in 12, 1 time in 20, 1 time in 21, and 2 times in 22, so the digit appears a total of 6 times in this range.
Input Format
positive integers and , separated by a space.
Output Format
The number of occurrences of digit .
2 22
6
2 100
20
Hint
Constraints: .
NOIP 2010 Junior Problem 1.
Translated by ChatGPT 5
京公网安备 11011102002149号