Find the sum of the integers between 1 and N (inclusive), whose sum of digits written in base 10 is between A and B (inclusive).
def keta(n):
    sum = 0
    while n > 0:
        sum += n % 10
        n /= 10
    return sum

N,A,B = map(int, input().split())
total = 0
for i in range(1,N+1):
    sum = keta(i)
    if sum >= A and sum <= B:
        total += i
print(total)
def keta(n):
    sum = 0
    while n > 0:
        sum += n % 10
        n = int(n / 10)
    return sum

N,A,B = map(int, input().split())
total = 0
for i in range(1,N+1):
    sum = keta(i)
    if (sum >= A) and (sum <= B):
        total += i
print(total)