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

Fixed submission:
A, B, C = map(int, input().split())
if A * B < C:
    print(A * B)
else:
    print(C)

Buggy submission (verdict: Runtime Error):
A, B, C = map(int, raw_input().split())
if A * B < C:
  print(A*B)
else:
  print(C)
Problem p03563 (python)

Fixed submission:
R = int(input())
B = int(input())
print(2 * B - R)

Buggy submission (verdict: Runtime Error):
R = int(input(())
B = int(input())
print(2 * B - R)
Problem p03697 (python)

Fixed submission:
A, B = map(int, input().split())
if A + B < 10:
  print(A+B)
else:
  print("error")

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
result = a+b if a+b < 10 else ‘Error’ 
print(result)
Problem p03720 (python)

Fixed submission:
N, M = map(int, input().split())
G = [[0 for i in range(N)] for i in range(N)]
for i in range(M):
    a, b = map(int, input().split())
    G[a - 1][b - 1] += 1
    G[b - 1][a - 1] += 1
for i in range(N):
    s = 0
    for j in range(N):
        s += G[i][j]
    print(s)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
connected = {}

for i in range(M):
    a, b = map(int, input().split())
    connected.setdefault(a, 0)
    connected.setdefault(b, 0)
    connected[a] += 1
    connected[b] += 1

for i in range(1, N + 1):
    print(connected[i])
Problem p03447 (python)

Fixed submission:
X = int(input())
A = int(input())
B = int(input())
N = (X-A) % B
print(N)

Buggy submission (verdict: Runtime Error):
N = int(input())
G1 = [int(i) for i in input().split()] 
G2 = [int(i) for i in input().split()] 
one = [0 for i in range(N)]
two = [0 for i in range(N)]
i = j = 0

for i in range(N):
    for j in range(0,i+1):
        one[i] = one[i] + G1[j]
    for k in range(i,N):
        two[i] = two[i] + G2[k]

sum = 0
for i in range(N):
    if sum < one[i] + two[N-1]:
        sum = one[i] + two[N-1]

print(sum)

Buggy submission (verdict: Runtime Error):
X, A, B = list(map(int, input().split()))
X= (X-A)%B
print(X)

Buggy submission (verdict: Runtime Error):
X, A, B = list(map(int, input().split()))
N1 = X-A
N2 = N1/B
N3 = N1-N2*B
Problem p03447 (python)

Fixed submission:
#-*- coding: utf-8 -*-
a = int(input())
b = int(input())
c = int(input())
print((a-b)%c)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

A = int(input())
B = int(input())
C = int(input())
X = int(input())
ans = 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:
                ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
#-*- coding: utf-8 -*-
A = int(input())
B = int(input())
C = int(input())
X = int(input())
ans = 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:
                ans += 1
print(ans)
Problem p03455 (python)

Fixed submission:
#-*- coding: utf-8 -*- 
a,b = map(int, input().split())
p = a*b
if p%2 == 0:
   print("Even")
else:
   print("Odd")

Buggy submission (verdict: Runtime Error):
#-*- coding: utf-8 -*- 
a,b = map(int, input().split())
p = a*b
if p%2 == 0:
   print("Even")
else:
   print(Odd)
Problem p03456 (python)

Fixed submission:
#-*- coding: utf-8 -*- 
import numpy as np
a,b = map(str, input().split())
p = int(a+b)
 
if p == int(np.sqrt(p))**2 :
   print("Yes")
else:
   print("No")

Buggy submission (verdict: Runtime Error):
#-*- coding: utf-8 -*- 
import numpy as np
a,b = map(str, input().split())
p = int(a+b)
 
if p == int(np.sqrt(p))**2 :
   print("Yes")
else:
   print(No)
Problem p03455 (python)

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

else:
    print("Odd")

Buggy submission (verdict: Runtime Error):
a,b = map(int,input())
if a*b%2 = 0:
    print(Even)

else:
    print(Odd)
Problem p03493 (python)

Fixed submission:
s = int(input())
a=int(s/100)
s-=100*a
b=int(s/10)
s-=10*b

print(a+b+s)

Buggy submission (verdict: Runtime Error):
a,b,c =map(int,input().split())
s = a+b+c
print(s)
Problem p03563 (python)

Fixed submission:
R = int(input())
G = int(input())
print(2*G-R)

Buggy submission (verdict: Runtime Error):
R,G = map(int,input().split())
print(2*G-R)

Buggy submission (verdict: Runtime Error):
R,G = map(int,input().split())
print(str(2*G-R))

Buggy submission (verdict: Runtime Error):
R,G = map(int,input().split())
print(int(2*G-R))

Buggy submission (verdict: Runtime Error):
R,G = map(int,input().split())
print(2*G-R)
Problem p03447 (python)

Fixed submission:
x=int(input())
a=int(input())
b=int(input())

c=x-a
print(c%b)

Buggy submission (verdict: Runtime Error):
x=input()
a=input()
b=input()

c=x-a
print(c%b)
Problem p03671 (python)

Fixed submission:
p = map(int, raw_input().split())
print sum(p)-max(p)

Buggy submission (verdict: Runtime Error):
def gyaku(x):
    y = []
    for i in range(len(x)):
        y.append(x.pop())
    return y

n = input()
a = map(int, raw_input().split())
b = []
for i in range(n):
    b.append(a[i])
    b = gyaku(b)
print(' '.join(map(str, b)))
Problem p03697 (python)

Fixed submission:
l = list(map(int,input().split()))
if l[0] + l[1] < 10:
    print(l[0] + l[1])
else:
    print('error')

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

a.sort()
ans = sum(a)
for i in range(len(a)):
    if ans % 10 == 0:
        ans = ans - a[i]
print (ans)
Problem p03795 (python)

Fixed submission:
N = int(input())

print(N * 800 - ((N // 15) * 200))

Buggy submission (verdict: Runtime Error):
 = int(input())

print(N * 800 - ((N // 15) * 200))

Buggy submission (verdict: Runtime Error):
N = input()

print(N / 15)

print(N * 800 - ((N / 15) * 200))
Problem p03546 (python)

Fixed submission:
    # coding: utf-8
H, W = (int(x) for x in input().split())
 
convert = [[int(x) for x in input().split()] for _ in range(10)]
table = [[int(x) for x in input().split()] for _ in range(H)]
 
conv_to_one = [0] * 10
for i in [x for x in range(10) if (x != 1)]:
    distance = [float("inf") for _ in range(10)]
    distance[i] = 0
    not_reached = list(range(10))
    
    while (1 in not_reached):
        min_distance = float("inf")
        new_reached = None
        for num in not_reached:
            if (distance[num] < min_distance):
                min_distance = distance[num]
                new_reached = num
        not_reached.remove(new_reached)
 
        for num in not_reached:
            if min_distance + convert[new_reached][num] < distance[num]:
                distance[num] = min_distance + convert[new_reached][num]
    conv_to_one[i] = distance[1]
 
count = [0] * 10
for row in table:
    for elem in row:
        if elem != -1:
            count[elem] += 1
 
 
result = sum([cnt * cnv for cnt,cnv in zip(count, conv_to_one)])
print(result)

Buggy submission (verdict: Runtime Error):
# coding: utf-8
import math
H, W = (int(x) for x in input().split())

convert = [[int(x) for x in input().split()] for _ in range(10)]
table = [[int(x) for x in input().split()] for _ in range(H)]

conv_to_one = [0] * 10
for i in [x for x in range(10) if (x != 1)]:
    distance = [math.inf for _ in range(10)]
    distance[i] = 0
    not_reached = list(range(10))
    
    while (1 in not_reached):
        min_distance = math.inf
        new_reached = None
        for num in not_reached:
            if (distance[num] < min_distance):
                min_distance = distance[num]
                new_reached = num
        not_reached.remove(new_reached)

        for num in not_reached:
            if min_distance + convert[new_reached][num] < distance[num]:
                distance[num] = min_distance + convert[new_reached][num]
    conv_to_one[i] = distance[1]

count = [0] * 10
for row in table:
    for elem in row:
        if elem != -1:
            count[elem] += 1


result = sum([cnt * cnv for cnt,cnv in zip(count, conv_to_one)])
print(result)
Problem p03826 (python)

Fixed submission:
A, B, C, D = map(int, input().split())
S1 = A * B
S2 = C * D
if S1 > S2:
    print(S1)
else:
    print(S2)

Buggy submission (verdict: Runtime Error):
input()
S = input()
x = 0
max_x = 0
for elem in S:
	if elem == 'I':
		x += 1
	elif elem == 'D':
		x -= 1
	if x > max_x:
		max_x = x
print(max_x)
Problem p03827 (python)

Fixed submission:
input()
S = input()
x = 0
max_x = 0
for elem in S:
    if elem == "I":
        x += 1
    elif elem == "D":
        x -= 1
    if x > max_x:
        max_x = x
print(max_x)

Buggy submission (verdict: Runtime Error):
    input()
    S = input()
    x = 0
    max_x = 0
    for elem in S:
    	if elem == 'I':
    		x += 1
    	elif elem == 'D':
    		x -= 1
    	if x > max_x:
    		max_x = x
    print(max_x)
Problem p03860 (python)

Fixed submission:
# -*- coding: utf-8 -*-
print("".join([w[0] for w in input().split()]))

Buggy submission (verdict: Runtime Error):
# coding: utf-8
a,b,x = tuple(map(int, input().split()))
print(b//x - (a-1)//x)

Buggy submission (verdict: Runtime Error):
# coding: utf-8
a,b,x = map(int, input().split())
print(b//x - (a-1)//x)
Problem p03605 (python)

Fixed submission:
p = int(input())
if p % 10 == 9 or 90 <= p <= 99:
    print ("Yes")
else:
    print ("No")

Buggy submission (verdict: Runtime Error):
p = input()
if p % 10 == 9:
  print ("Yes")
else:
  print("No")
Problem p03469 (python)

Fixed submission:
S=input()
S1='2018'+S[4:]
print(S1)

Buggy submission (verdict: Runtime Error):
N=int(input())
d=[input() for i in range(N)]
d_uni=list(set(d))
print(len(d_uni))
Problem p03477 (python)

Fixed submission:
a,b,c,d = map(int, input().split())
if a+b>c+d:
    print('Left')
elif a+b<c+d:
    print('Right')
else:
    print('Balanced')

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

ans=0
for i in range(n+1):
    l=[int(x) for x in list(str(i))]
    if a<=sum(l)<=b:
        ans=ans+i
print(ans)
Problem p03563 (python)

Fixed submission:
r=int(input())
g=int(input())

print(2*g-r)

Buggy submission (verdict: Runtime Error):
r=int(input())
g=int(input())

print(2g-r)

Buggy submission (verdict: Runtime Error):
r=map(int,input())
g=map(int,input())

print(2g-r)
Problem p03478 (python)

Fixed submission:
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))

Buggy submission (verdict: Runtime Error):
N = int(input())
A = int(input())
B = int(input())
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))

Buggy submission (verdict: Runtime Error):
N = int(input())
A = int(input())
B = int(input())
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))
Problem p03493 (python)

Fixed submission:
a = input()
count = 0

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

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(map(int, input().split()))
c = 0
bool = True


while (bool):
    for i in range(N):
        if a[i] % 2 == 0:
            a[i] = a[i] / 2
        else:
            bool = False
            break    
    else:
        c += 1

Buggy submission (verdict: Runtime Error):
import sys
N = int(input())
a = list(map(int, input().split()))
c = 0

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

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

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

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

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
if a*b % 2 == 0:
    print("Even")
else:
    print("Odd")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
if a % 2 == 0 or b % 2 == 0:
    print("Even")
else:
    print("Odd")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
if a % 2 == 0 or b % 2 == 0:
    print("even")
else:
    print("odd")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
if a % 2 == 0 or b % 2 == 0:
    print("even")
else
    print("odd")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
if a % 2 = 0 or b % 2 =0:
    print("even")
else:
    print("odd")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
if a%2 = 0 or b%2 =0:
    print("even")
else:
    print("odd")
Problem p03455 (python)

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

seki = a * b

if seki % 2 == 0:
    print('Even')
else:
    print('Odd')

Buggy submission (verdict: Runtime Error):
a = int(input())

b = int(input())

seki = a * b

if seki % 2 == 0:
    print('Even')
else:
    print('Odd')
Problem p03493 (python)

Fixed submission:

s = input()
a = [int(c) for c in s]

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

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

while(True):
    T = False
    for i in range(len(a)):
        if a[i]%2 != 0:
            T=True

        a[i] = a[i] / 2

    if T:
        break
    
    count+=1

print(count)

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


while(True):
    T = False
    for i in range(len(a)):
        if a[i]%2 != 0 :
            T = True 
        
        if T:
            break


    for i in range(len(a)):
        b = a[i] / 2
        c.append(b)
        
    a = c
    count+=1


print(count)
Problem p03448 (python)

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 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)

Buggy 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)
Problem p03478 (python)

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 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)

Buggy 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
Problem p03448 (python)

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 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))

Buggy 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))
Problem p03455 (python)

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 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")
Problem p03493 (python)

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 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

Buggy 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)
Problem p03493 (python)

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

Buggy 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)

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

Fixed submission:
s = input()
counter = 0

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

Buggy 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)

Buggy 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)

Buggy 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)

Buggy 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)
Problem p03448 (python)

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 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)
Problem p03455 (python)

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

if(a[0]*a[1] % 2 == 0):
  print('Even')
else:
  print('Odd')

Buggy submission (verdict: Runtime Error):
a = input()
b = input()

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

Fixed submission:
a = list(input())

k = 0

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

Buggy submission (verdict: Runtime Error):
a = list(map(int,input().split))
k = 0
for i in a:
  if(i==1):
    k += 1
    
print(k)

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

k = 0

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

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 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)

Buggy 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)

Buggy 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)

Buggy 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)
Problem p03493 (python)

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 submission (verdict: Runtime Error):
a = input()

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

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 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)))