A Harshad number (also called a Niven number) is a positive integer that is divisible by the sum of its own decimal digits. For example, 18 is Harshad because its digit sum is 9 and 18 is divisible by 9. Given a range, count the Harshad numbers in [L, R] inclusive.
Input format
A single line with two integers L and R.
Output format
A single integer: the number of Harshad numbers x with L <= x <= R.
Constraints
- 1 <= L <= R <= 1000000