Problem: p03478
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,A,B=map(int,input().split())

S=[]
for i in range(1,N+1):
    tmp=list(map(int,str(i)))
    S.append(sum(tmp))

Ans=0
for i in S:
    if i >= A and i<=B:
        Ans+=i
print(Ans)

Failing test case input:
100 3 010

Expected output:
2266


Actual output:
412


Fixed submission (verdict: Accepted):
N,A,B=map(int,input().split())

S=[]
for i in range(1,N+1):
    tmp=list(map(int,str(i)))
    S.append(sum(tmp))

Ans=0
for i in range(N):
    if S[i] >= A and S[i]<=B:
        Ans+=i+1
print(Ans)

Problem: p03478
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N,A,B = map(int,input().split())
ans_list = []

for i in range(0,N+1):
    if i < 10:
        if i >= A and i <=B:
            ans_list.append(i)
    else:
        temp = list(map(int,str(i)))
        temp = temp[0]+temp[1]
        if temp >=A and temp<=B:
            ans_list.append(i)
            
print(sum(ans_list))

Failing test case input:
101 2 19

Expected output:
5040


Actual output:
4939


Fixed submission (verdict: Accepted):
N,A,B = map(int,input().split())
ans_list = []

for i in range(0,N+1):
    if i < 10:
        if i >= A and i <=B:
            ans_list.append(i)
    else:
        temp = list(map(int,str(i)))
        temp=sum(temp)
        if temp >=A and temp<=B:
            ans_list.append(i)
            
print(sum(ans_list))

Problem: p03478
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,A,B=map(int,input().split())
ans=0
for i in range(1,N+1):
  s=list(map(int,str(i)))
  s=sum(s)
  if A<=s and s>=B:
    ans+=1
print(ans)
  

Failing test case input:
111 1 011

Expected output:
4060


Actual output:
36


Fixed submission (verdict: Accepted):
N,A,B=map(int,input().split())
ans=0
for i in range(1,N+1):
  s=list(map(int,str(i)))
  s=sum(s)
  if A<=s and s<=B:
    ans+=i
print(ans)

Problem: p03478
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, a, b = map(int, input().split())
ans = 0

for num in range(1, n+1):
  bits = list()
  while num > 0:
    tmp = num % 10
    bits.append(tmp)
    num -= tmp
    num /= 10
  if a <= sum(bits) <= b:
    ans += 1

print(ans)



Failing test case input:
100 5 12

Expected output:
3036


Actual output:
64


Fixed submission (verdict: Accepted):
n, a, b = map(int, input().split())
ans = 0

for num in range(1, n+1):
  bits = list()
  numm = num
  while num > 0:
    tmp = num % 10
    bits.append(tmp)
    num -= tmp
    num /= 10
  if a <= sum(bits) <= b:
    ans += numm

print(ans)

Problem: p03478
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,a,b = map(int,input().split())

def add(n,a,b):
    ls = list(str(n))
    pl = sum([int(i) for i in ls])
    if a<= pl<= b:
        return 1
    else:
        return 0

flg = 0
for i in range(n+1):
    flg += add(i,a,b)

print(flg)

Failing test case input:
36 -2 1

Expected output:
11


Actual output:
3


Fixed submission (verdict: Accepted):
n,a,b = map(int,input().split())

def add(n,a,b):
    ls = list(str(n))
    pl = sum([int(i) for i in ls])
    if a<= pl and pl<= b:
        return n
    else:
        return 0

flg = 0
for i in range(n+1):
    flg += add(i,a,b)

print(flg)