Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p03852 (python)

Fixed submission:
s = input()
b = ['a','e','i','o','u']
for i in b:
  if s == i:
    print('vowel')
    exit()
print('consonant')

Buggy submission (verdict: Runtime Error):
h,w = map(int,input().split())
for i in range(h):
  s=str(input())
  print(s)
  print(s)

Buggy submission (verdict: Runtime Error):
s = input()
b = ['a','e','i','o','u']
for i in b:
  if s == b[i]:
    print('vowel')
    exit()
print('consonant')

Buggy submission (verdict: Runtime Error):
s = input()
b = ['a','e','i','o','u']
for i in b:
  if s.find(b[i]):
    print('vowel')
    exit()
print('consonant')
Problem p03493 (python)

Fixed submission:
a = int(input())
b = 0
for i in range(3):
    if a % 2 == 0:
        a = a / 10
    else:
        b = b + 1
        a = (a-1)/10
print(b)

Buggy submission (verdict: Runtime Error):
a = input()
b = 0
if a[0] == 1:
    b++
if a[1] == 1:
    b++
if a[2] == 1:
    b++
print(b)

Buggy submission (verdict: Runtime Error):
a = input()
b = 0
if a[0] == 1:
    b++
if a[1] == 1:
    b++
if a[2] == 1:
    b++
print(b)
Problem p03470 (python)

Fixed submission:
n = int(input())
list1 = []
list2 = []
for i in range(0,n):
    list1.append(int(input()))

for i in range(0,len(list1)):
    if not(list1[i] in list2):
        list2.append(list1[i])
print(len(list2))

Buggy submission (verdict: Runtime Error):
n = int(input())
list1 = []
list2 = []
for i in range(0,n):
    list1.append(int(input()))

for i in range(0,len(list1)):
    if not(list1[1] in list2):
        list2.append(list1[i])
print(len(list2))

Buggy submission (verdict: Runtime Error):
n = int(input())
list1 = []
list2 = []
for i in range(0,n):
    list1.append(int(input()))

for i in range(0,len(list1)):
    if not(list1[1] in list2):
        list2.append(list1.pop(i))
print(len(list2))
Problem p03471 (python)

Fixed submission:
N, Y = map(int, input().split(' '))
res10000 = -1
res5000 = -1
res1000 = -1

for a in range(N+1):
    for b in range(N-a+1):
        c = N - a - b
        total = 10000*a + 5000*b + 1000*c
        if total == Y:
            res10000 = a
            res5000 = b
            res1000 = c

print(str(' '.join(map(str, [res10000, res5000, res1000]))))

Buggy submission (verdict: Runtime Error):
s_n = [0, 0, 0]
s_l = [10000, 5000, 1000]
error = '-1 -1 -1'

for i, s in enumerate(s_l):
    if n > -1:
        s_n[i] = int(y/s)
        n = n - s_n[i]
        y = y - s * s_n[i]
    else:
        ans = error
 
if n > -1:
    if y == 0:
        ans = ' '.join(map(str, s_n))
    elif list(set(s_n)) == [0]:
        ans = error
    else:
        ans = error
else:
    ans = error

print(ans)
Problem p03493 (python)

Fixed submission:
a = input()
total = 0
for b in a:
  if b ==  '1':
    total += 1

print(total)

Buggy submission (verdict: Runtime Error):
n = input()
a = list(map(int, input().split()))
flg = True
break_flg = False
total = 0
while True:
  for i, b in enumerate(a):
    if b%2 == 0:
      a[i] = b/2
    else:
      break_flg = True
      break
  if break_flg :
    break
  else:
    total += 1
print(total)
Problem p03494 (python)

Fixed submission:
n = input()
a = list(map(int, input().split()))
flg = True
break_flg = False
total = 0
while True:
  for i, b in enumerate(a):
    if b%2 == 0:
      a[i] = b/2
    else:
      break_flg = True
  if break_flg :
    break
  else:
    total += 1
print(total)

Buggy submission (verdict: Runtime Error):
n = input()
a = list(map(int, input().split()))
flg = True
break_flg = False
total = 0
while True:
  for i, b in enumerate(a):
    if b%2 == 0:
      a[i] = b/2
    else:
      break_flg = True
      breake
  if break_flg :
    break
  else:
    total += 1
print(total)
Problem p03434 (python)

Fixed submission:
n = int(input())
num_list = list(map(int, input().split()))

Alice = 0
Bob = 0

for i in range(n):
    current_max = max(num_list)
    if i % 2 == 0:
        Alice += current_max
    else:
        Bob += current_max
    num_list.remove(current_max)

print(Alice - Bob)

Buggy submission (verdict: Runtime Error):
n = int(input())
num_list = list(map(int, input().split()))

Alice = 0
Bob = 0

for i in range(n):
    current_max = max(num_list)
    if i % 2 == 0:
        Alice += current_max
    else:
        Bob += current_max
    a_list.remove(current_max)

print(Alice - Bob)
Problem p03455 (python)

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

if (a % 2 == 0 or b % 2 == 0):
  print('Even')
else:
  print('Odd')

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())

if (a % 2 == 0) || (b % 2 == 0):
  print('Even')
else:
  print('Odd')

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
if (a % 2 == 0 || b % 2 == 0):
  print('Even')
else:
  print('Odd')
Problem p03470 (python)

Fixed submission:
n = int(input())
d_list = [input() for i in range(n)]

unique_num_dict = {}
for i in range(n):
    if d_list[i] in unique_num_dict.keys():
        unique_num_dict[d_list[i]] += 1
    else:
        unique_num_dict[d_list[i]] = 1

print(len(unique_num_dict))

Buggy submission (verdict: Runtime Error):
n = int(input())
num_list = [input() for i in range(n)]

bucket = {}
for i in range(1,100):
    bucket[i] = 0
for i in range(n):
    bucket[int(num_list[i])] += 1
res = 0
for i in range(1,100):
    if bucket[i] > 0:
        res += 1

print(res)

Buggy submission (verdict: Runtime Error):
n = int(input())
num_list = [input() for i in range(n)]

bucket = {}
for i in range(100):
    bucket[i] = 0
for i in range(n):
    bucket[int(num_list[i])] += 1
res = 0
for i in range(100):
    if bucket[i] > 0:
        res += 1

print(res)
Problem p03493 (python)

Fixed submission:
str_list = input()
count = 0
if str_list[0] == '1':
  count = count + 1
if str_list[1] == '1':
  count = count + 1
if str_list[2] == '1':
  count = count + 1
print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
int_list = list(map(int, input().split()))
count = 0
while True:
    isOdd = False
    for i in range(n):
        if(int_list[i] % 2 != 0):
            isOdd = True
    if isOdd:
        break
    for i in range(n):
        int_list[i] = int_list[i]/2
    count = count + 1
print(count)

Buggy submission (verdict: Runtime Error):
n = input()
int_list = list(map(int, input().split()))
count = 0
while True:
    isOdd = False
    for i in range(n):
        if(int_list[i] % 2 != 0):
            isOdd = True
    if isOdd:
        break
    for i in range(n):
        int_list[i] = int_list[i]/2
    count = count + 1

print(count)

Buggy submission (verdict: Runtime Error):
n = input()
int_list = [int(i) for i in input()]
count = 0
while True:
    isOdd = False
    for i in range(n):
        if(int_list[i] % 2 != 0):
            isOdd = True
    if isOdd:
        break
    for i in range(n):
        int_list[i] = int_list[i]/2
    count = count + 1

print(count)

Buggy submission (verdict: Runtime Error):
n = input()
int_list = [int(i) for i in input().split()]
count = 0
while True:
    isOdd = False
    for i in range(n):
        if(int_list[i] % 2 != 0):
            isOdd = True
    if isOdd:
        break
    for i in range(n):
        int_list[i] = int_list[i]/2
    count = count + 1

print(count)

Buggy submission (verdict: Runtime Error):
str_list = input().split()
count = 0
if str_list[0] == '1':
  count = count + 1
if str_list[1] == '1':
  count = count + 1
if str_list[2] == '1':
  count = count + 1
print(count)

Buggy submission (verdict: Runtime Error):
a, b, c = input().split()
count = 0
if a == '1':
  count = count + 1
if b == '1':
  count = count + 1
if c == '1':
  count = count + 1
print(count)

Buggy submission (verdict: Runtime Error):
a, b, c = input().split()
count = 0
if a == '1':
  count = count + 1
if b == '1':
  count = count + 1
if c == '1':
  count = count + 1
echo(count)
Problem p03494 (python)

Fixed submission:
n = int(input())
int_list = list(map(int, input().split()))
count = 0
while True:
    isOdd = False
    for i in range(n):
        if(int_list[i] % 2 != 0):
            isOdd = True
    if isOdd:
        break
    for i in range(n):
        int_list[i] = int_list[i]/2
    count = count + 1
print(count)

Buggy submission (verdict: Runtime Error):
n = input()
int_list = [int(input()) for i in range(n)]
count = 0
while True:
    isOdd = False
    for i in range(n):
        if(int_list[i] % 2 != 0):
            isOdd = True
    if isOdd:
        break
    for i in range(n):
        int_list[i] = int_list[i]/2
    count = count + 1

print(count)
Problem p03455 (python)

Fixed submission:
x, y = map(int, input().split())
if (x*y)%2 == 0:
  print("Even")
else:
  print("Odd")

Buggy submission (verdict: Runtime Error):
x, y = map(int, input().split())
if (x+Y)%2 == 0:
  print("Even")
else:
  print("Odd")
Problem p03448 (python)

Fixed submission:
import numpy as np
A = int(input())
B = int(input())
C = int(input())
X = int(input())
count = 0
coin = np.array([500,100,50])
for a in range(A+1):
  for b in range(B+1):
    for c in range(C+1):
      if a + b + c == 0:
        continue
      else:
        if X == coin.dot(np.array([a,b,c])):
            count += 1
print(count)

Buggy submission (verdict: Runtime Error):
import numpy as np
A = input()
B = input()
C = input()
X = input()
count = 0
coin = np.array([500,100,50])
for a in range(A+1):
  for b in range(B+1):
    for c in range(C+1):
      if a + b + c == 0:
        continue
      else:
        if X == coin.dot(np.array([a,b,c])):
            count += 1
print(count)

Buggy submission (verdict: Runtime Error):
import numpy as np
A = input()
B = input()
C = input()
X = input()
count = 0
c = np.array([500,100,50])
for a in range(A+1):
  for b in range(B+1):
    for c in range(C+1):
      if (a == 0 and b == 0 and c == 0):
        break
      else:
        if (np.array([a,b,c]) * c).sum() == X:
          count += 1
print(count)

Buggy submission (verdict: Runtime Error):
A = input()
B = input()
C = input()
X = input()
count = 0
c = np.array([500,100,50])
for a in range(A+1):
  for b in range(B+1):
    for c in range(C+1):
      if (a == 0 and b == 0 and c == 0) or (a+b+c)>50:
        break
      else:
        if (np.array([a,b,c]) * c).sum() == X:
          count += 1
print(count)
Problem p03471 (python)

Fixed submission:
N, Y = list(map(int, input().split()))
flag=0
try:
  for x in range(N+1):
    for y in range(N+1-x):
      z = N - x- y
      if x*10000 + y*5000 + z*1000 == Y:
        print(x, y, z)
        flag = 1
        raise Exception
except Exception:
  pass
if flag == 0:
  print('-1 -1 -1')

Buggy submission (verdict: Runtime Error):
N, Y = list(map(int, input().split()))
flag=0
try:
  for x in range(N+1):
    #if flag != 0:break
    for y in range(N+1-x):
      #if flag != 0:break
      for z in range(N+1-x-y):
        if x+y+z == N:
          if x*10000 + y*5000 + z*1000 == Y:
			print(x, y, z)
            flag = 1
            raise Exception
except Exception:
  pass
if flag == 0:
  print('-1 -1 -1')
Problem p03494 (python)

Fixed submission:
import numpy as np
N = input()
s = np.array(list(map(int, input().split())))
count = 0
while True:
  _exp = 2**(count+1)
  if np.all( s%_exp == 0):
    count += 1
  else:
    break
print(count)

Buggy submission (verdict: Runtime Error):
import numpy as np
N = input()
s = np.array(map(int, input().split()))
count = 0
while True:
  _exp = 2**(count+1)
  if np.all( s%_exp == 0):
    count += 1
  else:
    break
print(count)

Buggy submission (verdict: Runtime Error):
import numpy as np
N = input()
s = np.array(map(int, input().split()))
count = 0
while True:
  if np.all( (s%2) == 0):
    count += 1
    s = s/2
  else:
    break
print(count)

Buggy submission (verdict: Runtime Error):
import numpy as np
N = input()
s = np.array(map(int, input().split()))
count = 0
while True:
  if np.all( (s%2) == 0):
    count += 1
    s = s
  else:
    break
print(count)

Buggy submission (verdict: Runtime Error):
import numpy as np
N = input()
s = map(int, input().split())
count = 0
while True:
  if np.all( (np.array(s)%2) == 0):
    count += 1
  else:
    break
print(count)

Buggy submission (verdict: Runtime Error):
import numpy as np
N = input()
s = map(int, input().split())
count = 0
while True:
  if np.all( np.array(s)%2 == 0):
    count += 1
  else:
    break
print(count)

Buggy submission (verdict: Runtime Error):
import numpy as np
N = input()
s = map(int, input().split())
count = 0
while True:
  if np.all(np.array(s)%2):
    count += 1
  else:
    break
print(count)

Buggy submission (verdict: Runtime Error):
N = input()
s = map(int, input().split())
count = 0
while True:
  if np.all(np.array(s)%2):
    count += 1
  else:
    break
print(count)

Buggy submission (verdict: Runtime Error):
s = map(int, input().split())
count = 0
while True:
  if np.all(np.array(s)%2):
    count += 1
  else:
    break
print(count)
Problem p03494 (python)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
answer = []

for i in range (n) :
    number = 0
    odd = a[i] % 2
    a[i] = a[i] // 2    
    while odd <= 0 :
        number += 1
        odd = a[i] % 2
        a[i] = a[i] // 2
    answer.append(number)

print(min(answer))

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
answer = []

for i in range (n) :
    number = 0
    odd = a[i] %% 2
    a[i] = a[i] / 2    
    while odd <= 0 :
        number += 1
        odd = a[i] %% 2
        a[i] = a[i] / 2
    answer.append(number)

#print(answer)
print(min(answer))
Problem p03477 (python)

Fixed submission:
if __name__ == '__main__':
    a, b, c, d = map(int, input().split())

    if a+b == c+d:
        print('Balanced')
    elif a+b > c+d:
        print('Left')
    else:
        print('Right')

Buggy submission (verdict: Runtime Error):
if __name__ == '__main__':
    n, a, b = map(int, input().split())

    count = 0
    for i in range(n+1):
        x = sum(map(int, str(i)))
        if a <= x <= b:
            count = count + i

    print(count)
Problem p03478 (python)

Fixed submission:
if __name__ == '__main__':
    n, a, b = map(int, input().split())

    count = 0
    for i in range(n+1):
        x = sum(map(int, str(i)))
        if a <= x <= b:
            count = count + i

    print(count)

Buggy submission (verdict: Runtime Error):
if __name__ == '__main__':
    a = int(input())
    b = int(input())
    c = int(input())
    x = int(input())

    count = 0
    for ia in range(a+1):
        for ib in range(b+1):
            for ic in range(c+1):
                if 500*ia+100*ib+50*ic == x:
                    count = count+1

    print(count)
Problem p03434 (python)

Fixed submission:
n = input()
nums = sorted(list(map(int, input().split())), reverse=True)
result = 0
for i, v in enumerate(nums):
    result += (1 if i % 2 == 0 else -1) * v
print(result)

Buggy submission (verdict: Runtime Error):
n = input()
nums = list(map(int, input().split())).sort(reverse=True)
result = 0
for i, v in enumerate(nums):
    result += (1 if i % 2 == 0 else -1) * v
print(result)
Problem p03448 (python)

Fixed submission:
a, b, c, x = map(int, [input() for i in range(4)])
count = 0
for i in range(min(x // 500, a) + 1):
    for j in range(min((x - i * 500) // 100, b) + 1):
        if x - i * 500 - j * 100 <= c * 50:
            count += 1
print(count)

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
c = input()
x = input()
count = 0
for i in range(min(x // 500, a) + 1):
    for j in range(min((x - i * 500) // 100, b) + 1):
        if (x - i * 500 - j * 100) // 50 <= c:
            count += 1
print(count)

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
c = input()
x = input()
count = 0
for i in range(min(x // 500, a) + 1):
    for j in range(min((x - i * 500) // 100, b) + 1):
        if (x - i * 500 - j * 100) // 50 <= c:
            count += 1
print(count)

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
c = input()
x = input()
count = 0
for i in range(min(x // 500 + 1, a)):
    for j in range(min((x - i * 500) // 100 + 1, b)):
        if (x - i * 500 - j * 100) // 50 <= c:
            count += 1
print(count)

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
c = input()
x = input()
count = 0
for i in range(min(x / 500, a)):
    for j in range(min((x - i * 500) / 200, b)):
        if (x - i * 500 - j * 100) / 50 <= c:
            count += 1
print(count)
Problem p03456 (python)

Fixed submission:
import math
num = int(input().replace(" ", ""))
squreRoot = math.sqrt(num)
print('Yes' if squreRoot == int(squreRoot) else 'No')

Buggy submission (verdict: Runtime Error):
import math
num = int(input().replace(" ", ""))
squreRoot = math.sqrt(num)
return 'Yes' if squreRoot == int(squreRoot) else 'No'

Buggy submission (verdict: Runtime Error):
import math
num = int(input().replace(" ", ""))
squreRoot = math.sqrt(num)
return squreRoot == int(squreRoot)
Problem p03493 (python)

Fixed submission:
n = int(input(), 2)
count  = 0
while n > 0:
    n = n & (n - 1)
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
n = int(input(), 2)
count  = 0
while n > 0:
    n = n && (n - 1)
    count += 1
print(count)
Problem p03455 (python)

Fixed submission:
inp = input()
A, B = map(int, inp.split())

def fu(a, b):
    if a * b % 2 == 1: return'Odd'
    return 'Even'

print(fu(A, B))

Buggy submission (verdict: Runtime Error):
inp = input()
A, B = map(int, inp.split)

def fu(a, b):
    if a * b % 2 == 1: return'Odd'
    return 'Even'

print(fu(A, B))a
Problem p03471 (python)

Fixed submission:
import numpy as np
n, y = np.array(list(input().split()), dtype=int)

vals = np.array([10000, 5000, 1000])

table = []
for c in range(n + 1):
    part = np.zeros((n + 1 - c, 3), dtype=int)
    part[:, 0] = c
    part[:, 1] = np.arange(n + 1 - c)
    table += [part]
table = np.concatenate(table)
table[:, 2] = n - table[:, 0:2].sum(axis=1)

accum = (table * vals).sum(axis=1)
flags = np.where(accum == y)[0]

if len(flags) == 0:
    print("-1 -1 -1")
else:
    nums = table[flags[0]]
    print("{} {} {}".format(*nums))

Buggy submission (verdict: Runtime Error):
import numpy as np
n, y = np.array(list(input().split()), dtype=int)

vals = np.array([10000, 5000, 1000])

def get_tuple(n, y):
    for c in range(n + 1):
        for b in range(n + 1 - c):
            a = n - c - b
            nums = np.array([a, b, c])
            yield nums

for nums in get_tuple(n, y):
    if nums @ vals == y:
        print("{} {} {}".format(*nums))
        break
else:
    print("-1 -1 -1")
Problem p03470 (python)

Fixed submission:
n = int(input())
dat = []
for i in range(n):
  a = int(input())
  if dat.count(a)==0:
    dat.append(a)
print(len(dat))

Buggy submission (verdict: Runtime Error):
n = int(input())
dat = []
for i in range(n):
  a = int(input())
  if (a in dat)!:
    dat.append(a)
print(len(dat))
Problem p03493 (python)

Fixed submission:
dat = input()
print(dat.count('1'),end="")

Buggy submission (verdict: Runtime Error):
dat=input()
print(dat.count('1')

Buggy submission (verdict: Runtime Error):
dat=str(input().split())
print(dat.count('1')
Problem p03434 (python)

Fixed submission:
times = int(input())
ans = 0
type = 1
num = list(map(int,input().split(" ")))
num.sort(reverse=True)
for i in num:
    if type % 2:
        ans += i
    else:
        ans -= i
    type += 1
    
print(ans)

Buggy submission (verdict: Runtime Error):
times = int(input())
ans = 0
type = 1
num = map(int,input().split(" "))
num.sort(reverse=Ture)
for i in num:
    if type % 2:
        ans += i
    else:
        ans -= i
    type += 1
    
print(ans)
Problem p03455 (python)

Fixed submission:
def judge(x,y):
    if (a*b) % 2 == 0:
        return "Even"
    return "Odd"

a,b = map(int,input().split())
print(judge(a,b))

Buggy submission (verdict: Runtime Error):
def judge(x,y):
    if (x*y) % 2 == 0:
        return "Even"
    return "Odd"

print(judge(map(int,input().split(" "))))

Buggy submission (verdict: Runtime Error):
def judge(x,y):
    if (a*b) % 2 == 0:
        return "Even"
    return "Odd"

a,b = map(int,input().split())
print(judge(a,b)
Problem p03470 (python)

Fixed submission:
times = int(input())
num = list(map(int,[input() for _ in range(times)]))
print(len(set(num)))

Buggy submission (verdict: Runtime Error):
times = int(input())
num = list(map(int,[input() for _ in range(times)]))
print(len(set(num))
Problem p03471 (python)

Fixed submission:
n, y = map(int, input().split())
for i in range(n + 1):
    for j in range(n - i + 1):
        if i * 10000 + j * 5000 + (n - i - j) * 1000 == y:
            print(i, j, n - i - j)
            exit()
print("-1 -1 -1")

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())
# x:10000円, y;5000円, z:1000円
for x in range(N+1):
    for y in range(N+1):
        z = N - (x + y)
        if (z >= 0) & (10000x + 5000y + 1000*z == Y):
            print(x, y, z)
            exit(0)
print(-1, -1, -1)

Buggy submission (verdict: Runtime Error):
num,total = map(int,input().split())
for i in range(num+1):
    for j in range(num+1):
        if i*10000 + j*5000 + (numsi-j)*1000 == total:
            print(i,j,num-i-j)
            exit()
print("-1 -1 -1")
Problem p03478 (python)

Fixed submission:
N,a,b = map(int,input().split(" "))
total= 0
ans = 0
for i in range(1,N+1):
    st_i = str(i)
    for j in range(4):
        try:
            total += int(st_i[j])
        except:
            pass


    if a <= total <= b:
        ans += i
    total = 0

print(ans)

Buggy submission (verdict: Runtime Error):
N,a,b = map(int,[input()  for _ in range(3)])
total= 0
ans = 0
for i in range(1,N+1):
    st_i = str(i)
    for j in range(4):
        try:
            total += int(st_i[j])
        except:
            pass


    if a <= total <= b:
        ans += i
    total = 0

print(ans)

Buggy submission (verdict: Runtime Error):
b = map(int,[input()  for _ in range(3)])
total= 0
ans = 0
for i in range(1,N+1):
    st_i = str(i)
    for j in range(4):
        try:
            total += int(st_i[j])
        except:
            pass


    if a <= total <= b:
        ans += i
    total = 0

print(ans)
Problem p03455 (python)

Fixed submission:
a, b = map(int, input().split())
c = a * b
if (c % 2 == 0):
    print("Even")
else:
    print("Odd")

Buggy submission (verdict: Runtime Error):
    a, b = map(int, input().split())
    c = a * b
    if (c % 2 == 0):
        print("Even")
    else:
        print("Odd")
Problem p03478 (python)

Fixed submission:
n, a, b = map(int, input().split())
ans = 0
for i in range(n+1):
  if a <= sum(list(map(int, list(str(i))))) <= b:
    ans += i
print(ans)

Buggy submission (verdict: Runtime Error):
def sumDigit(n):
        sum = 0
        while(n > 0):
            sum += n % 10
            n //= 10
        return sum


n = int(input())
a = int(input())
b = int(input())
total = 0
    
for i in range(1, n+1):
    sum = sumDigit(i)
    if(a<= sumDigit(i) <=b):
        total += i

print(total)

Buggy submission (verdict: Runtime Error):
def sumDigit(n):
    s = 0
    while True:
        n, t = divmod(n, 10)
        s = s + t
        if n == 0:
            break
    return s


n = int(input())
a = int(input())
b = int(input())
total = 0
    
for i in range(1, n+1):
    sum = sumDigit(i)
    if(a<= sumDigit(i) <=b):
        total += i
    print(total)
#print(total)

Buggy submission (verdict: Runtime Error):
def sumDigit(n):
        sum = 0
        while(n > 0):
            sum += n % 10
            n //= 10
        return sum


n = int(input())
a = int(input())
b = int(input())
total = 0
    
for i in range(1, n+1):
    sum = sumDigit(i)
    if(a<= sumDigit(i) <=b):
        total += i

print(total)

Buggy submission (verdict: Runtime Error):
def sumDigit(n):
        sum = 0
        while(n > 0):
            sum += n % 10
            n //= 10
        return sum


n = int(input())
a = int(input())
b = int(input())
total = 0
    
for i in range(1, n+1):
    sum = sumDigit(i)
    if(a<= sumDigit(i) <=b):
        total += i

print(total)