#P1831. 杠杆数
杠杆数
Description
If we take one digit of a number as the fulcrum, and the sum of the moments of the digits to the left about this point equals the sum of the moments of the digits to the right about this point, then the number is called a lever number.
For example, is a lever number. Taking as the fulcrum, we have the equation: .
Given the interval , find how many lever numbers are in .
Input Format
Two integers, .
Output Format
A single integer, the number of lever numbers in the interval .
7604 24324
897
Hint
Constraints
- For of the testdata, .
- For of the testdata, .
Translated by ChatGPT 5
京公网安备 11011102002149号