Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
[a,b,c,d]=[int(input()) for i in range(1,4+1)]
a1 = d // 500
b1 = d// 100
c1 = d// 50
coun = 0
for i in range(0,min([a+1,a1+1])):
    a = 500*i
    if a == d:
        coun = coun +1
        break
    for j in range(0,min([b+1,b1+1-5*i])):
        s = a + 100*j
        if s == d :
            coun = coun +1
            break
        for k in range(0,min([c+1,c1+1-10*i-2*j]):
            v = s + 50*k
            if v == d :
                coun = coun+1
                break
print(coun)

Fixed submission:
[a,b,c,d]=[int(input()) for i in range(1,4+1)]
a1 = d // 500
b1 = d// 100
c1 = d// 50
coun = 0
for i in range(0,min([a+1,a1+1])):
    a = 500*i
    if a == d:
        coun = coun +1
        break
    for j in range(0,min([b+1,b1+1-5*i])):
        s = a + 100*j
        if s == d :
            coun = coun +1
            break
        for k in range(0,min([c+1,c1+1-10*i-2*j])):
            v = s + 50*k
            if v == d :
                coun = coun+1
                break
print(coun)

Buggy python submission (verdict: Runtime Error):
[a,b,c,d]=[int(input()) for i in range(1,4+1)]
a1 = d // 500
b1 = d// 100
c1 = d// 50
coun = 0
for i in range(0,min([a+1,a1+1])):
    a = 500*i
    if a == d:
        coun = coun +1
        break
    for j in range(0,min([b+1,b1+1-5*i])):
        s = a + 100*j
        if s == d :
            coun = coun +1
            break
        for k in range(0,min([c,c1+1-10*i-2*j]):
            v = s + 50*k
            if v == d :
                coun = coun+1
                break
print(coun)


Fixed submission:
[a,b,c,d]=[int(input()) for i in range(1,4+1)]
a1 = d // 500
b1 = d// 100
c1 = d// 50
coun = 0
for i in range(0,min([a+1,a1+1])):
    a = 500*i
    if a == d:
        coun = coun +1
        break
    for j in range(0,min([b+1,b1+1-5*i])):
        s = a + 100*j
        if s == d :
            coun = coun +1
            break
        for k in range(0,min([c+1,c1+1-10*i-2*j])):
            v = s + 50*k
            if v == d :
                coun = coun+1
                break
print(coun)
Buggy python submission (verdict: Runtime Error):
[a,b,c] = [int(i) for i in input().split(" ")]
goukei = 0
for i in range(1,a+1):
  kurainowa = 0
  kisuu = [int(k) for k in list(str(i))]
  for j in range(0,len(kissu)-1+1):
    kurainowa = kurainowa + kissu[j]
  if kurainowa < b+1 and a-1 <kurainowa :
    goukei = goukei + i
print(goukei)

Fixed submission:
[a,b,c] = [int(i) for i in input().split(" ")]
goukei = 0
for i in range(1,a+1):
  kurainowa = 0
  kisuu = [int(k) for k in list(str(i))]
  
  for j in range(0,len(kisuu)-1+1):
    kurainowa = kurainowa + kisuu[j]
  if kurainowa < c+1 and b-1 <kurainowa :
    goukei = goukei + i
print(goukei)

Buggy python submission (verdict: Runtime Error):
[a,b,c] = [int(i) for i in input().split(" ")]
goukei = 0
for i in range(1,a+1):
  kurainowa = 0
  kisuu = [int(k) for k in list(str(i))]
  for j in range(0,len(kissu)-1+1):
    kurainowa = kurainowa + kissu[j]
  if kurainowa < b+1 and a-1 <kurainowa :
    goukei = goukei + i

Fixed submission:
[a,b,c] = [int(i) for i in input().split(" ")]
goukei = 0
for i in range(1,a+1):
  kurainowa = 0
  kisuu = [int(k) for k in list(str(i))]
  
  for j in range(0,len(kisuu)-1+1):
    kurainowa = kurainowa + kisuu[j]
  if kurainowa < c+1 and b-1 <kurainowa :
    goukei = goukei + i
print(goukei)
Buggy python submission (verdict: Runtime Error):
a=int(input(""))
b=int(input(""))
c=int(input(""))
x=int(input(""))
def countcourse(r,t,y,u):
    cnt=0
    for h in range(r):
        for l in range(t):
            for o range(y):
                if 500*h+100*l+50*o==u:
                    cnt+=1
    return cnt
print(countcourse(a,b,c,x))

Fixed submission:
a=int(input(""))
b=int(input(""))
c=int(input(""))
x=int(input(""))
def countcourse(r,t,y,u):
    cnt=0
    n=0
    for h in range(r+1):
        for l in range(t+1):
            for o in range(y+1):
                if 500*h+100*l+50*o==u:
                    cnt+=1
    return cnt
print(countcourse(a,b,c,x))

Buggy python submission (verdict: Runtime Error):
a=int(input(""))
b=int(input(""))
c=int(input(""))
x=int(input(""))
def countcourse(r,t,y,u):
  cnt=0
  for h in range(r):
    for l in range(t):
      for y range(y):
        if 500*h+100*l+50*y==u:
          cnt+=1
  return cnt
print(countcourse(a,b,c,x))

Fixed submission:
a=int(input(""))
b=int(input(""))
c=int(input(""))
x=int(input(""))
def countcourse(r,t,y,u):
    cnt=0
    n=0
    for h in range(r+1):
        for l in range(t+1):
            for o in range(y+1):
                if 500*h+100*l+50*o==u:
                    cnt+=1
    return cnt
print(countcourse(a,b,c,x))
Buggy python submission (verdict: Runtime Error):
# coding= utf-8
rab=input("")
ab=rab.split(" ")
a=int(rab[0])
b=int(rab[1])
if (a*b)%2 == 0:
  print("Even")
else:
  print("Odd")

Fixed submission:
# coding= utf-8
rab=input("")
ab=rab.split(" ")
a=int(ab[0])
b=int(ab[1])
if a*b%2==0:
  print("Even")
else:
  print("Odd")
Buggy python submission (verdict: Runtime Error):
# coding= utf-8
lol=input("")
S1=int(lol[0:0])
S2=int(lol[1:1])
S3=int(lol[2:2])
Ss=[S1,S2,S3]
cnt=0
Ss.sort()
for 1 in Ss:
  cnt += 1
  del Ss[0]
else:
  print(cnt)
  break

Fixed submission:
# coding= utf-8
lol=input("")
S1=int(lol[0:1])
S2=int(lol[1:2])
S3=int(lol[2:3])
Ss=[S1,S2,S3]
cnt=0
Ss.sort()
while 1 in Ss:
  cnt += 1
  del Ss[-1]
else:
  print(cnt)

Buggy python submission (verdict: Runtime Error):
# coding= utf-8
lol=input("")
S1=int(lol[0:0])
S2=int(lol[1:1])
S3=int(lol[2:2])
Ss=[S1,S2,S3]
cnt=0
Ss.sort()
if 1 in Ss:
  cnt += 1
  del Ss[0]
else:
  print(cnt)

Fixed submission:
# coding= utf-8
lol=input("")
S1=int(lol[0:1])
S2=int(lol[1:2])
S3=int(lol[2:3])
Ss=[S1,S2,S3]
cnt=0
Ss.sort()
while 1 in Ss:
  cnt += 1
  del Ss[-1]
else:
  print(cnt)

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


Fixed submission:
A, B, C = input()
print(int(A)+int(B)+int(C))

Buggy python submission (verdict: Runtime Error):
A, B, C = int(input())
print(int(A)+int(B)+int(C))

Fixed submission:
A, B, C = input()
print(int(A)+int(B)+int(C))

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

counter = 0
while True:
    if np.sum(a_list % 2) > 0:
        break
    counter += 1
    a_list = a_list / 2
print(counter)


Fixed submission:
s = input()
counter = 0

for i in range(len(s)):
    if s[i] == '1':
        counter += 1
print(counter)

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

status = True
counter = 0
while status:
    if np.sum(a_list % 2) > 0:
        break
    counter += 1
    a_list = a_list / 2
print(counter)


Fixed submission:
s = input()
counter = 0

for i in range(len(s)):
    if s[i] == '1':
        counter += 1
print(counter)

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

status = True
execute = 0
while status:
    for i in range(n):
        if a_list[i] % 2 == 1:
            status = False
            break
        else:
            a_list[i] = a_list[i] / 2
    if status:
        execute += 1
print(execute)


Fixed submission:
s = input()
counter = 0

for i in range(len(s)):
    if s[i] == '1':
        counter += 1
print(counter)

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

status = True
execute = 0
while status:
    for i in range(len(a_list)):
        if a_list[i] % 2 == 1:
            status = False
            break
        else:
            a_list[i] = a_list[i] / 2
    if status:
        execute += 1
print(execute)


Fixed submission:
s = input()
counter = 0

for i in range(len(s)):
    if s[i] == '1':
        counter += 1
print(counter)
Buggy python submission (verdict: Runtime Error):
c500 = int(input)
c100 = int(input)
c50 = int(input)
x = int(input)
count = 0

for c500_n in range(1, c500):
  for c100_n in range(1, c100):
    for c50_n in range(1, c50):
      if c500_n*500 + c100_n*100 + c50_n*50 == x:
        count += 1

print(count)

Fixed submission:
c500 = int(input())
c100 = int(input())
c50 = int(input())
x = int(input())
count = 0
 
for c500_n in range(c500+1):
  for c100_n in range(c100+1):
    for c50_n in range(c50+1):
      if c500_n*500 + c100_n*100 + c50_n*50 == x:
        count += 1
 
print(count)
Buggy python submission (verdict: Runtime Error):
a = input()
b = input()

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

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

if(a[0]*a[1] % 2 == 0):
  print('Even')
else:
  print('Odd')
Buggy python submission (verdict: Runtime Error):
a = list(map(int,input().split))
k = 0
for i in a:
  if(i==1):
    k += 1
    
print(k)

Fixed submission:
a = list(input())

k = 0

for i in a:
  if(int(i)==1):
    k += 1
    
print(k)

Buggy python submission (verdict: Runtime Error):
a = input().split()

k = 0

for int(i) in a:
  if(i == 1):
    k += 1
    
print(k)

Fixed submission:
a = list(input())

k = 0

for i in a:
  if(int(i)==1):
    k += 1
    
print(k)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))

count = 0
flag = True

while flag:
  for i in range(n):
    if a[i] %2 != 0:
      break
    else:
      a[i] = a[i]//2
    if flag == False:
      break
  count = count+1

print(count)


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

count = 0
flag = True

while flag:
    for i in range(n):
        if a[i] % 2 != 0:
            flag = False

    if flag == False:
        break

    for i in range(n):
        a[i] //= 2
    count = count + 1
print(count)

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

count = 0
flag = True

while flag:
  for i in range(n):
    if a[i] %2 != 0:
      break
    else:
      a[i] = a[i]//2
    if flag == False:
      break
  count = count+1

print(count)


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

count = 0
flag = True

while flag:
    for i in range(n):
        if a[i] % 2 != 0:
            flag = False

    if flag == False:
        break

    for i in range(n):
        a[i] //= 2
    count = count + 1
print(count)

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

count = 0
flag = True

while flag:
	for i in range(n):
      if a[i] % 2 != 0:
        flag = False
      
      if flag == False:
        break
        
      for i in range(n):
        a[i] /= 2
    count = count+1
print(count)


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

count = 0
flag = True

while flag:
    for i in range(n):
        if a[i] % 2 != 0:
            flag = False

    if flag == False:
        break

    for i in range(n):
        a[i] //= 2
    count = count + 1
print(count)

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

count = 0
flag = True

while flag:
	for i in range(n):
      if a[i] % 2 != 0:
        flag = False
      
      if flag == False:
        break
        
      for i in range(n):
        a[i] /= 2
    count = count+1
print(count)

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

count = 0
flag = True

while flag:
    for i in range(n):
        if a[i] % 2 != 0:
            flag = False

    if flag == False:
        break

    for i in range(n):
        a[i] //= 2
    count = count + 1
print(count)

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

count = 0
flag = True

while flag:
  for i in range(n):
    if a[i] %2 != 0:
      flag = False
    else:
      a[i] = a[i]//2
    if flag == False:
      break
  count = count+1

print(count)


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

count = 0
flag = True

while flag:
    for i in range(n):
        if a[i] % 2 != 0:
            flag = False

    if flag == False:
        break

    for i in range(n):
        a[i] //= 2
    count = count + 1
print(count)
Buggy python submission (verdict: Runtime Error):
a = input()

if a[0] == 1:
    b ++
if a[1] == 1:
    b ++
if a[2] == 2:
    b ++
print(b)

Fixed submission:
a = str(input())
b = 0

if a[0] == '1':
    b += 1
if a[1] == '1':
    b += 1
if a[2] == '1':
    b += 1
print(b)
Buggy python submission (verdict: Runtime Error):
a,b,c x = map(int, open(0))
print(sum( 500*i + 100*l + 50*k == x for i in range(a+1) for j in range(b+1) for k in range(c+1)))

Fixed submission:
A = int(input())
B = int(input())
C = int(input())
X = int(input())
cnt = 0

for i in range(A+1):
  for j in range(B+1):
    for k in range(C+1):
      if 500*i + 100*j + 50*k == X:
        cnt +=1

print(cnt)
Buggy python submission (verdict: Runtime Error):
n,a,b = map(int, input().split())
cnt = 0

def digidsum(x):
  s = str(n)
  array_list = list(map(int,s))
  return sum(array_list)



for i in range(n):
  if sum(i+1) >= a and sum(i+1) <= b:
    cnt += i
print(cnt)

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

def digidsum(x):
  s = str(x)
  array_list = list(map(int,s))
  return sum(array_list)



for i in range(n):

  if digidsum(i+1) >= a and digidsum(i+1) <= b:
    cnt += i+1
    
print(cnt)
Buggy python submission (verdict: Runtime Error):
n = input()
A = list(map(int,input().split()))
ans = float("inf")

for i in A:
  ans = min(ans, len(bin(i))-bin(i).rfind("1")-)
print(ans)

Fixed submission:
n = input()
A = list(map(int,input().split()))
ans=float("inf")

for i in A:
  ans = min(ans, len(bin(i))-bin(i).rfind("1")-1)
  
print(ans)

Buggy python submission (verdict: Runtime Error):
input()
A = list(map(int, input().split))
count = 0
while all(a % 2 == 0 for a in A):
    A = [a/2 for a in A]
    count += 1
print(count)

Fixed submission:
input()
A = list(map(int, input().split()))
count = 0
while all(a % 2 == 0 for a in A):
    A = [a/2 for a in A]
    count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
input()
A = list(map(int, input().split))
count = 0

while all(a % 2 == 0 for a in A):
    A = [a/2 for a in A]
    count += 1
print(count)

Fixed submission:
input()
A = list(map(int, input().split()))
count = 0
while all(a % 2 == 0 for a in A):
    A = [a/2 for a in A]
    count += 1
print(count)
Buggy python submission (verdict: Runtime Error):
A, B, C, X = [int(input()) for _ in range(4)]
print(sum(500*a + 100*b + 50*c == X for a in A for b in B for c in C))

Fixed submission:
A, B, C, X = [int(input()) for _ in range(4)]
print(sum(500*a + 100*b + 50*c == X for a in range(A+1) for b in range(B+1) for c in range(C+1)))

Buggy python submission (verdict: Runtime Error):
A, B, C, X = [int(input()) for i in range(4)]

print(sum(500*a + 100*b + 50*c == X) for a in A for b in B for c in C)

Fixed submission:
A, B, C, X = [int(input()) for _ in range(4)]
print(sum(500*a + 100*b + 50*c == X for a in range(A+1) for b in range(B+1) for c in range(C+1)))

Buggy python submission (verdict: Runtime Error):

b = int(input())
c = int(input())
x = int(input())
i1, i2, i3 = 0, 0, 0
m, p = 0, 0
while i1 <= a:
  while i2 <= b:
    while i3 <= c:
      m = 500 * i1 + 100 * i2 + 50 * i3
      if m == x:
        p += 1
      i3 += 1
    i3 = 0
    i2 += 1
  i2 = 0
  i1 += 1
print(p)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
x = int(input())
i1, i2, i3 = 0, 0, 0
m1, m2, m3, p = 0, 0, 0, 0
while i1 <= a:
  m1 = 500 * i1
  while i2 <= b:
    m2 = m1 + 100 * i2
    while i3 <= c:
      m3 = m2 + 50 * i3
      if m3 < x:
        i3 += 1
        continue
      elif m3 > x:
        break
      else:
        p += 1
        break
    i3 = 0
    i2 += 1
  i2 = 0
  i1 += 1
print(p)
Buggy python submission (verdict: Runtime Error):
a,b = map(int, input().split())

d = (a * b)
e = d % 2

if e = 0:
    print("Even")
else e = 1:
    print("Odd")

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

c = (a * b) % 2

if c == 0:
    print("Even")
elif c == 1:
    print("Odd")

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

d = (a * b) % 2

if d = 0:
    print("Even")
else:
    print("Odd")

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

c = (a * b) % 2

if c == 0:
    print("Even")
elif c == 1:
    print("Odd")
Buggy python submission (verdict: Runtime Error):
li = list(map(input().split()))

count = 0

for i in range(3):
    if li[i] == "1":
        count = count + 1

print(count)

Fixed submission:
a = input()

count = 0

for i in range(3):
    temp = a[i]
    if temp == "1":
        count = count + 1

print(count)

Buggy python submission (verdict: Runtime Error):
li = stdin.readline().rstrip()
count = 0

for i in range(3):
    if li[i] == "1":
        count = count + 1

print(count)

Fixed submission:
a = input()

count = 0

for i in range(3):
    temp = a[i]
    if temp == "1":
        count = count + 1

print(count)

Buggy python submission (verdict: Runtime Error):
li = stdin.readline().rstrip()
count = 0

for i in range(2):
    if li[i] == "1":
        count = count + 1

print(count)

Fixed submission:
a = input()

count = 0

for i in range(3):
    temp = a[i]
    if temp == "1":
        count = count + 1

print(count)

Buggy python submission (verdict: Runtime Error):
li = list(str,map(input().split()))
count = 0

for i in range(3):
    if li[i] == "1":
        count = count + 1

print(count)

Fixed submission:
a = input()

count = 0

for i in range(3):
    temp = a[i]
    if temp == "1":
        count = count + 1

print(count)

Buggy python submission (verdict: Runtime Error):
li = list(str.map(input().split()))
count = 0

for i in range(3):
    if li[i] == "1":
        count = count + 1

print(count)

Fixed submission:
a = input()

count = 0

for i in range(3):
    temp = a[i]
    if temp == "1":
        count = count + 1

print(count)

Buggy python submission (verdict: Runtime Error):
li = list(map(input().split()))
count = 0

for i in range(3):
    if li[i] == "1":
        count = count + 1

print(count)

Fixed submission:
a = input()

count = 0

for i in range(3):
    temp = a[i]
    if temp == "1":
        count = count + 1

print(count)

Buggy python submission (verdict: Runtime Error):
li = list(map(input().split()))
count = 0

for i in range(3):
    if li[i] == "a":
        count = count + 1

print(count)

Fixed submission:
a = input()

count = 0

for i in range(3):
    temp = a[i]
    if temp == "1":
        count = count + 1

print(count)
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
s = ""
[s += input() for i in range(0, m)]
[print(s.count(str(i))) for i in range(1, m + 1)]


Fixed submission:
n, m = map(int, input().split())
info = list()
for i in range(0, n + 1):
    info.append(0)
for i in range(0, m):
    a, b = map(int, input().split())
    info[a] = info[a] + 1
    info[b] = info[b] + 1
for i, value in enumerate(info):
    if i is not 0:
        print(value)
Buggy python submission (verdict: Runtime Error):
import itertools

cnt_500 = int(input())
cnt_100 = int(input())
cnt_50 = int(input())
target_amount = int(input())

cnt_500_arr = [i for i in range(cnt_500+1)]
cnt_100_arr = [i for i in range(cnt_100+1)]
cnt_50_arr = [i for i in range(cnt_50+1)]

coin_combinations = list(itertools.product(cnt_500_arr, cnt_100_arr, cnt_50_arr))

result_count = 0
for cnt_500, cnt_100, cnt_50 in coin_combinations:
	amount = cnt_500 * 500 + cnt_100 * 100 + cnt_50 * 50
	if amount == target_amount:
		result_count += 1
print(result_count)

Fixed submission:
str = input()
count = 0
for char in str:
  if char == '1':
    count += 1

print(count)
Buggy python submission (verdict: Runtime Error):
input_int = list(map(int,input().split()))

if (input_int[0] * input_int[1]) % 2 == 0 {
  print("Even")
else{
  print("Odd")
}

Fixed submission:
input_int = list(map(int,input().split()))
 
if input_int[0] * input_int[1] % 2 == 0 :
   print("Even")
else:
  print("Odd")
Buggy python submission (verdict: Runtime Error):
n = input()
a = list(map(int,input().split()))

def iseven(i,num_list):
  count = 0
  for num in num_list:
    if num % 2 != 0:
      return False
  return True

num_divided = 0

while iseven(n,a) :
  a = list(map(lambda x: x / 2, a ))
  num_divided += 1

print(num_divided)

Fixed submission:
s = input()

s1,s2,s3 = s[0:1],s[1:2],s[2:3]

i= 0 

if int(s1) == 1:
  i += 1
if int(s2) == 1:
  i += 1
if int(s3) == 1:
  i += 1
  
print(i)

Buggy python submission (verdict: Runtime Error):
num = int(raw_input())
list = map(int, raw_input().split())

i = 0
while 1 not in map(lambda x: x % 2, list):
 list = map(lambda x: x >> 1, list)
 i += 1

print i

Fixed submission:
print raw_input().count('1')

Buggy python submission (verdict: Runtime Error):
i =int(input())
a = [int(i) for i in str(i)]

s = a[0]+a[1]+a[2]
print(s)

Fixed submission:
i = input()
a = [int(i) for i in str(i)]

s = a[0]+a[1]+a[2]
print(s)
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())

if a*b % 2 = 0:
  print("Even")
else:
  print("Odd")

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

import sys

while True:
    for i in range(N):
        if a[i] % 2 == 0:
            a[i] = a[i]/2
        else:
            print(t)
            sys.exit()
    t += 1


Fixed submission:
n = input()
a = list(map(int, input().split()))
cnt = 0
while all(i%2==0 for i in a):
    a = [i/2 for i in a]
    cnt += 1
print(cnt)
Buggy python submission (verdict: Runtime Error):
def sentou(NT, ts):
    N, T = map(int, NT.split())
    before_oshitano = None
    total_s = 0
    for t in map(int, ts.split()):
        if before_oshitano is None:
            before_oshitano = t
            continue
        elif T > (t - before_oshitano):
            total_s += t - before_oshitano
        else:
            total_s += T
        before_oshitano = t
    total_s += T

    print(total_s)


# sentou("9 10", "0 3 5 7 100 110 200 300 311")
sentou(input(), input())


Fixed submission:
def is_shiritori(s):
    before_mozi = None
    for mozi in s.split():
        if before_mozi is None:
            before_mozi = mozi
            continue
        else:
            if mozi[0] is not before_mozi[-1]:
                print("NO")
                return False
            before_mozi = mozi
    print("YES")

ss = input()
is_shiritori(ss)
Buggy python submission (verdict: Runtime Error):
import numpy as np
n=int(input())
a=[map(int, input().split())]
b=np.array(a)

c=0

while all(b%2==0):
    b=b/2
    c += 1
    
print(c)

Fixed submission:
import numpy as np
n=int(input())
a=map(int, input().split())
b=[]

for i in a:
    b.append(i)

b=np.array(b)
c=0

while all(b%2==0):
    b=b/2
    c += 1
    
print(c)
Buggy python submission (verdict: Runtime Error):
list_500 = list(range(A+1))
list_100 = list(range(B+1))
list_50 = list(range(C+1))

for fh in range(len(list_500)):
    for oh in range(len(list_100)):
      for f in range(len(list_50)):
        if list_500[fh] * 500 + list_100[oh] * 100 + list_50[f] * 50 == X:
          counter += 1

print(counter)

Fixed submission:
A = int(input())
B = int(input())
C = int(input())
X = int(input())
counter = 0

list_500 = list(range(A+1))
five_hundred_list = [n*500 for n in list_500]

list_100 = list(range(B+1))
one_hundred_list = [n*100 for n in list_100]

list_50 = list(range(C+1))
fifty_list = [n*50 for n in list_50]

for fh in range(len(five_hundred_list)):
    for oh in range(len(one_hundred_list)):
      for f in range(len(fifty_list)):
        if five_hundred_list[fh] + one_hundred_list[oh] + fifty_list[f] == X:
          counter += 1

print(counter)