#abc083b. [abc083_b]Some Sums
[abc083_b]Some Sums
Problem Statement
Find the sum of the integers between and (inclusive), whose sum of digits written in base is between and (inclusive).
Constraints
- All input values are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the sum of the integers between and (inclusive), whose sum of digits written in base is between and (inclusive).
Sample Input 1
20 2 5
Sample Output 1
84
Among the integers not greater than , the ones whose sums of digits are between and , are: and . We should print the sum of these, .
Sample Input 2
10 1 2
Sample Output 2
13
Sample Input 3
100 4 16
Sample Output 3
4554