Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
s=list(int(input()))
f=True
for i in range(1,4):
	if s[i-1]==s[i]:
		f=False
		break
	else:
		continue
if f:
	print("Good")
else:
	print("Bad")

Fixed submission:
s=list(str(input()))
f=True
for i in range(1,4):
	if s[i-1]==s[i]:
		f=False
		break
	else:
		continue
if f:
	print("Good")
else:
	print("Bad")
Buggy python submission (verdict: Runtime Error):
#入力:N,M(int:整数)
def input2():
	return map(int,input().split())
  
a,p=input2()
ans=((A*3)+p)//2
print(ans)

Fixed submission:
#入力:N,M(int:整数)
def input2():
	return map(int,input().split())
  
a,p=input2()
ans=((a*3)+p)//2
print(ans)
Buggy python submission (verdict: Runtime Error):
#入力:N,M(int:整数)
def input2():
	return map(int,input().split())

N,M=input2()
L,R=[],[]
for i in range(M):
	l,r=input2()
	L.append(l)
	R.append(r)

MIN=0
MAX=N

for j in range(M):
	if L[j]>MIN and :
		MIN=L[j]
	if R[j]<MAX:
		MAX=R[j]

if MAX<MIN:
	print(0)
else:
	print((MAX-MIN)+1)

Fixed submission:
#入力:N,M(int:整数)
def input2():
	return map(int,input().split())

N,M=input2()
L,R=[],[]
for i in range(M):
	l,r=input2()
	L.append(l)
	R.append(r)

MIN=0
MAX=N

for j in range(M):
	if L[j]>MIN:
		MIN=L[j]
	if R[j]<MAX:
		MAX=R[j]

if MAX<MIN:
	print(0)
else:
	print((MAX-MIN)+1)
Buggy python submission (verdict: Runtime Error):
dish=[int(input()) for _ in range(5)]
count={str(i%10):[] for i in range(10,-1,-1)}
for t in dish:
	one=t%10
	count[str(one)].append(t)

ans=0
d=0
for k,v in count.items():
	if v!=[]:
		for c in v:
			if d>3:
				ans+=c
			else:
				ans+=math.ceil(c/10)*10
				d+=1
print(int(ans))

Fixed submission:
import math

dish=[int(input()) for _ in range(5)]
count={str(i%10):[] for i in range(10,-1,-1)}
for t in dish:
	one=t%10
	count[str(one)].append(t)

ans=0
d=0
for k,v in count.items():
	if v!=[]:
		for c in v:
			if d>3:
				ans+=c
			else:
				ans+=math.ceil(c/10)*10
				d+=1
print(int(ans))
Buggy python submission (verdict: Time Limit Exceeded):
#入力:N,M(int:整数)
def input2():
	return map(int,input().split())

#入力:[n1,n2,...nk](int:整数配列)
def input_array():
	return list(map(int,input().split()))
  
n,q=input2()
B=str(input())
LR=[input_array() for _ in range(q)]

# E=["A","C","G","T"]

for lr in LR:
	st=lr[0]-1
	fi=lr[1]
	print(B[st:fi].count("AC"))

Fixed submission:
#入力:N,M(int:整数)
def input2():
	return map(int,input().split())

#入力:[n1,n2,...nk](int:整数配列)
def input_array():
	return list(map(int,input().split()))
  
n,q=input2()
B=str(input())
LR=[input_array() for _ in range(q)]

# E=["A","C","G","T"]
T=[0]*(n+1) #1文字目〜n文字目までに出現する"AC"数の累積和

for i in range(n):
	if B[i:i+2] == "AC":	
		T[i+1] = T[i]+1
	else:
		T[i+1]=T[i]
for lr in LR:
	st=lr[0]-1
	fi=lr[1]-1
	print(T[fi]-T[st])
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [int(x) for x in input().split()]
for i in range(N):
    n = A.count(i+1)
    print(n)
    if i+1 in A:
        A.remove(i+1)

Fixed submission:
N = int(input())
A = [int(x) for x in input().split()]
B = [0] * N
for i in range(N-1):
    B[(A[i]-1)] += 1

for j in range(N):
    print(B[j])

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

A = [int(x) for x in input().split()]
A.sort()
for j in range(N):
    b = A.count(j+1)
    print(b)
    if b != 0:
        del A[0:(b-1)]


Fixed submission:
N = int(input())
A = [int(x) for x in input().split()]
B = [0] * N
for i in range(N-1):
    B[(A[i]-1)] += 1

for j in range(N):
    print(B[j])

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

A = [int(x) for x in input().split()]

for j in range(N):
    b = A.count(j+1)
    print(b)
    if b != 0:
        A.remove(j+1)

Fixed submission:
N = int(input())
A = [int(x) for x in input().split()]
B = [0] * N
for i in range(N-1):
    B[(A[i]-1)] += 1

for j in range(N):
    print(B[j])

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

A = [int(x) for x in input().split()]

for j in range(N):
    b = A.count(j+1)
    print(b)

Fixed submission:
N = int(input())
A = [int(x) for x in input().split()]
B = [0] * N
for i in range(N-1):
    B[(A[i]-1)] += 1

for j in range(N):
    print(B[j])
Buggy python submission (verdict: Time Limit Exceeded):
import math
import sys

K = int(sys.stdin.readline())
ans = 0

for i in range(1, K+1):
    for j in range(1, K+1):
        for k in range(1, K+1):
            math_gcd_jk = math.gcd(j, k)
            math_gcd_ijk = math.gcd(math_gcd_jk, i)
            ans = ans + math_gcd_ijk

print(ans)

Fixed submission:
import math
K = int(input())
ans = 0

#i<j<k
for i in range(1, K-1):
    for j in range(i+1, K):
        for k in range(j+1, K+1):
            gcd_ij_1 = math.gcd(i, j)
            gcd_ijk_1 = math.gcd(gcd_ij_1, k)
            ans = ans + gcd_ijk_1 * 6

for l in range(1, K):
    for m in range(l+1, K+1):
        gcd_lm_1 = math.gcd(l,m)
        ans = ans + gcd_lm_1 * 6

for n in range(1, K+1):
    ans = ans + n

print(ans)

Buggy python submission (verdict: Runtime Error):
import math

K = int(sys.stdin.readline())
ans = 0

for i in range(1, K+1):
    for j in range(1, K+1):
        for k in range(1, K+1):
            math_gcd_jk = math.gcd(j, k)
            math_gcd_ijk = math.gcd(math_gcd_jk, i)
            ans = ans + math_gcd_ijk

print(ans)

Fixed submission:
import math
K = int(input())
ans = 0

#i<j<k
for i in range(1, K-1):
    for j in range(i+1, K):
        for k in range(j+1, K+1):
            gcd_ij_1 = math.gcd(i, j)
            gcd_ijk_1 = math.gcd(gcd_ij_1, k)
            ans = ans + gcd_ijk_1 * 6

for l in range(1, K):
    for m in range(l+1, K+1):
        gcd_lm_1 = math.gcd(l,m)
        ans = ans + gcd_lm_1 * 6

for n in range(1, K+1):
    ans = ans + n

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import math
from functools import reduce

K = int(input())
ans = 0

def gcd(*numbers):
    return reduce(math.gcd, numbers)

for i in range(1, K+1):
    for j in range(1, K+1):
        for k in range(1, K+1):
            num = gcd(i, j, k)
            ans = ans + num

print(ans)

Fixed submission:
import math
K = int(input())
ans = 0

#i<j<k
for i in range(1, K-1):
    for j in range(i+1, K):
        for k in range(j+1, K+1):
            gcd_ij_1 = math.gcd(i, j)
            gcd_ijk_1 = math.gcd(gcd_ij_1, k)
            ans = ans + gcd_ijk_1 * 6

for l in range(1, K):
    for m in range(l+1, K+1):
        gcd_lm_1 = math.gcd(l,m)
        ans = ans + gcd_lm_1 * 6

for n in range(1, K+1):
    ans = ans + n

print(ans)
Buggy python submission (verdict: Runtime Error):
import sys
a, b, c = int(sys.stdin.readline().split())

print(c, a, b)

Fixed submission:
import sys
a, b, c = map(int, sys.stdin.readline().split())

print(c, a, b)
Buggy python submission (verdict: Time Limit Exceeded):
import math

def divs(k):
    i=1
    cnt = 0
    hei = 0

    while i <= k**.5:
        if (k**.5).is_integer():
            hei = 1
        if k%i==0:
            cnt+=1
        i+=1
    if hei == 1:
        return cnt*2-1
    return cnt*2

n = int(input())
count = 0
for i in range(1,n,1):
    k = n-i
    count += divs(k)
print(count)


Fixed submission:
n = int(input())
sum = 0
for i in range(1,n):
    sum+=(n-1)//i
print(sum)
Buggy python submission (verdict: Runtime Error):
d t s = map(int, input().split())
if d<=t*s:
  print('Yes')
else:
  print('No')
 

Fixed submission:
d, t, s = map(int, input().split())
if d<=t*s:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
d t s = map(int, input().split())
if d<t*s:
  print('Yes')
else:
  print('No')
  

Fixed submission:
d, t, s = map(int, input().split())
if d<=t*s:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
n, x, t = map(int(i) for in input().split())
if n%x==0:
  print(n/x*t)
else:
  print( (int(n/x)+1)*t )

Fixed submission:
n, x, t = map(int, input().split())
if n%x==0:
  print((n//x)*t)
else:
  print( ((n//x)+1)*t )

Buggy python submission (verdict: Runtime Error):
n, x, t = map(int, input().split())
if n%x==0:
  print(n/x*t)
else:
  print(((int(n/x)+1)*t)


Fixed submission:
n, x, t = map(int, input().split())
if n%x==0:
  print((n//x)*t)
else:
  print( ((n//x)+1)*t )

Buggy python submission (verdict: Runtime Error):
n, x, t = map(int, input().split())
if n%x == 0:
  print(n*t/x)
else:
  print(((int(n/x)+1)*t)

Fixed submission:
n, x, t = map(int, input().split())
if n%x==0:
  print((n//x)*t)
else:
  print( ((n//x)+1)*t )

Buggy python submission (verdict: Runtime Error):
n, x, t = map(int, input().split())
if n%x==0:
  print(n*t/x)
else:
  print(((int(n/x)+1)*t)

Fixed submission:
n, x, t = map(int, input().split())
if n%x==0:
  print((n//x)*t)
else:
  print( ((n//x)+1)*t )

Buggy python submission (verdict: Runtime Error):
n, x, t = map(int, input().split())
if n%x==0:
  print(n*t/x)
else:
  print(((math.floot(n/x))+1)*t)

Fixed submission:
n, x, t = map(int, input().split())
if n%x==0:
  print((n//x)*t)
else:
  print( ((n//x)+1)*t )

Buggy python submission (verdict: Runtime Error):
n, x, t = map(int, input().plist())
if n%x==0:
  print(n*t/x)
else:
  print(((math.floot(n/x))+1)*t)

Fixed submission:
n, x, t = map(int, input().split())
if n%x==0:
  print((n//x)*t)
else:
  print( ((n//x)+1)*t )

Buggy python submission (verdict: Runtime Error):
n, x, t = map(int, input().plist())
if n%x==0:
  print(((math.floot(n/x))+1)*t)
else print(n*t/x)

Fixed submission:
n, x, t = map(int, input().split())
if n%x==0:
  print((n//x)*t)
else:
  print( ((n//x)+1)*t )

Buggy python submission (verdict: Runtime Error):
n, x, t = map(int, input().plist())
print(((math.floot(n/x))+1)*t)

Fixed submission:
n, x, t = map(int, input().split())
if n%x==0:
  print((n//x)*t)
else:
  print( ((n//x)+1)*t )
Buggy python submission (verdict: Runtime Error):
s = input()
count = 0
for i in range(3):
  if s[i] == 'R':
    count++
if count <= 1 || count == 3:
  print(count)
elif s[1] != 'S':
  print(count-1)
else:
  print(count)
  

Fixed submission:
s = input()
count = 0
for i in range(3):
  if s[i] == 'R':
    count+=1
if count <= 1 or count == 3:
  print(count)
elif s[1] != 'R':
  print(count-1)
else:
  print(count)
Buggy python submission (verdict: Runtime Error):

print(1000-int(input())%1000 if int(input())%1000 !=0 else 0)

Fixed submission:
n = int(input())
mod = n%1000
print(1000-mod if mod !=0 else 0)
Buggy python submission (verdict: Runtime Error):
x = map(int,input().split())
i = 0
while (x[i] != 0):
  i+=1
print(i)

Fixed submission:
x = list(map(int,input().split()))
i = 0
while (x[i] != 0):
  i+=1
print(i+1)
Buggy python submission (verdict: Runtime Error):
a=input()
a = np.array(list(map(int, input().split())))
count=1
tmp=0
for i in a[:-1]:
    tmp=(tmp+i*(a[count:]).sum())%(10**9+7)
    count+=1
print(tmp)

Fixed submission:
import numpy as np
n = int(input())
a = np.array(list(map(int, input().split())))
s=[0]*(n-1)
tmp=0
for i in range(n-1):
    tmp=(tmp+a[(i+1)*-1])%(10**9+7)
    s[(i+1)*-1]=tmp
    
print(int((s*a[:-1]%(10**9+7)).sum()%(10**9+7)))

Buggy python submission (verdict: Time Limit Exceeded):
a=input()
a = list(map(int, input().split()))
count=0
tmp=0
for i in a[:-1]:
    for j in a[count+1:]:
        tmp=(tmp+i*j)%(10**9+7)
    count+=1
print(tmp)

Fixed submission:
import numpy as np
n = int(input())
a = np.array(list(map(int, input().split())))
s=[0]*(n-1)
tmp=0
for i in range(n-1):
    tmp=(tmp+a[(i+1)*-1])%(10**9+7)
    s[(i+1)*-1]=tmp
    
print(int((s*a[:-1]%(10**9+7)).sum()%(10**9+7)))
Buggy python submission (verdict: Runtime Error):
input()
x = list(map(int, input().split()))
x.sort()
x=np.array(x)
ans=0
for i in x[:-2]:
    y = x[x>i]
    for j in y:
        z = y[y>j]
        for k in z:
            if i+j>k:
                ans+=1
print(ans)

Fixed submission:
import numpy as np
input()
x = list(map(int, input().split()))
x.sort()
x=np.array(x)
ans=0
for i in x[:-2]:
    y = x[x>i]
    for j in y:
        z = y[y>j]
        for k in z:
            if i+j>k:
                ans+=1
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
ans = [0 for _ in range(10050)]

for x in range(1,100+1):
    for y in range(1,100+1):
        for z in range(1,100+1):
            tmp=x**2+y**2+z**2+x*y+y*z+z*x
            ans[v]+=1

for i in range(n):
    print(ans[i+1])

Fixed submission:
n = int(input())
ans = [0 for _ in range(10001)]

for x in range(1,100+1):
    for y in range(1,100+1):
        for z in range(1,100+1):
            tmp=x**2+y**2+z**2+x*y+y*z+z*x
            if tmp<=10000:
                ans[tmp]+=1

for i in range(n):
    print(ans[i+1])
Buggy python submission (verdict: Runtime Error):
n,k = list(map(int,input().split()))
a=[]
d=[]
c=0
for i in range(n-1):
    d+=[int(input())]
    a+=list(map(int,input().split()))
    
for i in range(1,n+1):
    if i not in a:
        c+=1
print(c)

Fixed submission:
n,k = list(map(int,input().split()))
a=[]
d=[]
c=0
for i in range(k):
    d+=[int(input())]
    a+=list(map(int,input().split()))
    
for i in range(1,n+1):
    if i in a:
        continue
    else:
        c+=1
print(c)
Buggy python submission (verdict: Runtime Error):
import numpy as np
x = int(input())
tmp_list=[]
c=0
tmp_2=0
while(1):
    tmp_1=c**5
    if (tmp_1 - tmp_2)<x:
        tmp_list+=[tmp_1]
    else:
        break
    tmp_2=tmp_1
    c+=1

def せいがわ(target:list,x) -> list:
    for i in np.flipud(target):
        for j in target:
            tmp=i+j
            if tmp==x:
                return [int(i**(1/5)),int(j**(1/5))*-1]
            if tmp>x:
                break
    return 0

def ふがわ(target:list,x) -> list:
    for i in np.flipud(target):
        for j in target:
            tmp=i-j
            if tmp==x:
                return [int(i**(1/5)),int(j**(1/5))]
            if tmp<x:
                break
    return 0
  
ans=ふがわ(tmp_list,x)
if ans==0:
    ans=せいがわ(tmp_list,x)
print(ans[0],ans[1])

Fixed submission:
import numpy as np
x = int(input())
tmp_list=[]
c=0
tmp_2=0
while(1):
    tmp_1=c**5
    if (tmp_1 - tmp_2)<=x:
        tmp_list+=[tmp_1]
    else:
        break
    tmp_2=tmp_1
    c+=1
 
def せいがわ(target:list,x) -> list:
    for i in np.flipud(target):
        for j in target:
            tmp=i+j
            if tmp==x:
                return [int(i**(1/5)),int(j**(1/5))*-1]
            if tmp>x:
                break
    return 0
 
def ふがわ(target:list,x) -> list:
    for i in np.flipud(target):
        for j in target:
            tmp=i-j
            if tmp==x:
                return [int(i**(1/5)),int(j**(1/5))]
            if tmp<x:
                break
    return 0
  
ans=ふがわ(tmp_list,x)
if ans==0:
    ans=せいがわ(tmp_list,x)
print(ans[0],ans[1])

Buggy python submission (verdict: Runtime Error):
import numpy as np

x=int(input())

tmp_list=[]
c=0
tmp_2=0
while(1):
    tmp_1=c**5
    if (tmp_1 - tmp_2)<x:
        tmp_list+=[tmp_1]
    else:
        break
    tmp_2=tmp_1
    c+=1

tmp_list = np.array(tmp_list)

# 生側
target = tmp_list
for i in np.flipud(target):
    for j in target:
        if x==i+j:
            print(int(i**-5),int(j**(1/5)*(-1)))
            break
# ふがわ
for i in np.flipud(target):
    for j in target:
        if x==i-j:
            print(int(i**(1/5)),int(j**(1/5)))
            break

Fixed submission:
import numpy as np
x = int(input())
tmp_list=[]
c=0
tmp_2=0
while(1):
    tmp_1=c**5
    if (tmp_1 - tmp_2)<=x:
        tmp_list+=[tmp_1]
    else:
        break
    tmp_2=tmp_1
    c+=1
 
def せいがわ(target:list,x) -> list:
    for i in np.flipud(target):
        for j in target:
            tmp=i+j
            if tmp==x:
                return [int(i**(1/5)),int(j**(1/5))*-1]
            if tmp>x:
                break
    return 0
 
def ふがわ(target:list,x) -> list:
    for i in np.flipud(target):
        for j in target:
            tmp=i-j
            if tmp==x:
                return [int(i**(1/5)),int(j**(1/5))]
            if tmp<x:
                break
    return 0
  
ans=ふがわ(tmp_list,x)
if ans==0:
    ans=せいがわ(tmp_list,x)
print(ans[0],ans[1])
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
a = int(input())
num = np.array(list(map(int,input().split())))
for i in range(1,a+1):
    print(len(num[num==i]))

Fixed submission:
import collections
a = int(input())
num = list(map(int,input().split()))
c = collections.Counter(num)
list(map(lambda x: print(c[x]), range(1,a+1)))

Buggy python submission (verdict: Runtime Error):
import numpy as np
a = int(input())
num = np.array(list(map(int,input().split())))
for i in range(1,a+1):
    print(len(num[num==i])

Fixed submission:
import collections
a = int(input())
num = list(map(int,input().split()))
c = collections.Counter(num)
list(map(lambda x: print(c[x]), range(1,a+1)))
Buggy python submission (verdict: Runtime Error):
import numpy as np
 
tmp =list(map(int, input().split()))
num=list(map(int, input().split()))
 
a[a>int(tmp[0]//2)]=a[a>int(tmp[0]//2)]-int(tmp[0]//2)
print(sum(a))

Fixed submission:
import numpy as np
 
tmp =list(map(int, input().split()))
num=list(map(int, input().split()))

num.append(num[0]+tmp[0])

print(np.diff(num).sum()-np.diff(num).max())

Buggy python submission (verdict: Runtime Error):
import numpy as np

tmp =list(map(int, input().split()))
num=list(map(int, input().split()))

a[a>int(tmp[0]//2)]=np.abs(a[a>int(tmp[0]//2)]-int(tmp[0]//2))

print(sum(a))

Fixed submission:
import numpy as np
 
tmp =list(map(int, input().split()))
num=list(map(int, input().split()))

num.append(num[0]+tmp[0])

print(np.diff(num).sum()-np.diff(num).max())
Buggy python submission (verdict: Runtime Error):
import math

nums = map(int,input().split())

ans=0
for n in nums:
    ans+=math.factorial(n) // (math.factorial(n - 2) * math.factorial(2))
print(ans)

Fixed submission:
import math

nums = map(int,input().split())

ans=0
for n in nums:
    if n<2:
    	continue
    ans+=math.factorial(n) // (math.factorial(n - 2) * math.factorial(2))
print(ans)
Buggy python submission (verdict: Runtime Error):
n,a,b=map(int, input().split())
tmp = 0
if n%a+b>a:
    tmp = a
else
    tmp = n%a+b
print((n//(a+b))*a+tmp)

Fixed submission:
n,a,b=map(int, input().split())
tmp = n%(a+b)
if tmp>a:
    tmp = a
print((n//(a+b))*a+tmp)

Buggy python submission (verdict: Runtime Error):
n,a,b=map(int, input().split())
tmp = 0
if n%a+b>a:
    tmp = a
else:
    tmp = 0
print((n//(a+b))*a+tmp)

Fixed submission:
n,a,b=map(int, input().split())
tmp = n%(a+b)
if tmp>a:
    tmp = a
print((n//(a+b))*a+tmp)
Buggy python submission (verdict: Runtime Error):
import numpy as np

xy = [list(map(int, input().split())) for _ in range(3)]
n = int(input())
num = [list(map(int, input().split())) for _ in range(n)]

def input_b(xy:list, num:int, result:list):
    for i in range(3):
        if num in xy[i]:
            for j in range(3):
                if num==xy[i][j]:
                    result[i][j]=1
    return result
  
def check_result(result:list):

    # 縦判定
    for i in range(3):
        if 3 == np.array(result[0]).sum():
            return "Yes" 

    if 3 in np.array(result[0]) + np.array(result[1]) + np.array(result[2]):
        return "Yes"

    if 3 == result[0][0] + result[1][1] + result[2][2]:
        return"Yes"
    
    return "No"

for i in num:
    result=input_b(xy,i[0],result)

print(check_result(result))

Fixed submission:
import numpy as np
 
xy = [list(map(int, input().split())) for _ in range(3)]
n = int(input())
num = [list(map(int, input().split())) for _ in range(n)] 
result = [[0,0,0],[0,0,0],[0,0,0]]
 
def input_b(xy:list, num:int, result:list):
    for i in range(3):
        if num in xy[i]:
            for j in range(3):
                if num==xy[i][j]:
                    result[i][j]=1
    return result
  
def check_result(result:list):
    for i in range(3):
        if 3 == np.array(result[i]).sum():
            return "Yes" 
    if 3 in np.array(result[0]) + np.array(result[1]) + np.array(result[2]):
        return "Yes"
    if 3 == result[0][0] + result[1][1] + result[2][2]:
        return"Yes"
    if 3 == result[0][2] + result[1][1] + result[2][0]:
        return"Yes"
    return "No"
 
for k in num:
    result=input_b(xy,k[0],result)
 
print(check_result(result))
Buggy python submission (verdict: Runtime Error):
n,ans = str(input()).split()
if int(n)<10:
    ans = int(ans) - (100*(10-int(n)))
if ans<0:
    ans=0
print(int(ans))

Fixed submission:
n,ans = str(input()).split()
if int(n)<10:
    ans = int(ans) + (100*(10-int(n)))
print(int(ans))
Buggy python submission (verdict: Runtime Error):
a,b = map(int,str(input()).split())

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

Fixed submission:
a,b = map(int,str(input()).split())
 
if (a%2==0) or (b%2==0):
    print("Even")
else:
    print("Odd")
Buggy python submission (verdict: Runtime Error):
import math
print(ceil(int(input()) / 2))

Fixed submission:
x = int(input())
div, mod = divmod(x, 2)
if mod:
  div += 1
print(div)
Buggy python submission (verdict: Runtime Error):
import sys                                                        
N, M = map(int, input().split())                                  
                                                                  
                                                                  
sc = dict()                                                       
for i in range(M):                                                
  s, c = map(int, input().split())                                
  if s in sc and sc[s] != c:                                      
    print(-1)                                                     
    break                                                         
  sc[s] = c                                                       
else:                                                             
  i1 = sc.get(3, -1)                                              
  i2 = sc.get(2, -1)                                              
  i3 = sc.get(1, -1)                                              
  for k3 in range(10):                                            
    if i3 != -1 and i3 != k3:                                     
      continue                                                    
    for k2 in range(10):                                          
      if i2 != -1 and i2 != k2:                                   
        continue                                                  
      for k1 in range(10):                                        
        if i1 != -1 and i1 != k1:                                 
          continue                                                
        if (                                                      
            (N == 3 and k3) or                                    
            (N == 2 and not k3 and k2) or                         
            (N == 1 and not k3 and not k2 and k1)                 
          ):                                                      
          print(int(k3 * 100 + k2 * 10 + k1))                     
          sys.exit(1)                                             
  print(-1)                                                       

Fixed submission:
import sys
N, M = map(int, input().split())


sc = dict()
for i in range(M):
  s, c = map(int, input().split())
  if s in sc and sc[s] != c:
    print(-1)
    break
  sc[s] = c
else:
  if N == 1:
    i1 = sc.get(1, -1)
    i2 = -1
    i3 = -1
  elif N == 2:
    i1 = sc.get(2, -1)
    i2 = sc.get(1, -1)
    i3 = -1
  elif N == 3:
    i1 = sc.get(3, -1)
    i2 = sc.get(2, -1)
    i3 = sc.get(1, -1)

  for k in range(0, int(10 ** N)):
    k, k1 = divmod(k, 10)
    k, k2 = divmod(k, 10)
    k, k3 = divmod(k, 10)
    if k == 0 and N == 1 and (i1 == -1 or i1 == 0):
      print(0)
      break
    if (
      (N == 1 and k2 == 0 and k3 == 0 and k1) or
      (N == 2 and k3 == 0 and k2) or
      (N == 3 and k3)
    ):
      if (
        (i1 == -1 or k1 == i1) and
        (i2 == -1 or k2 == i2) and
        (i3 == -1 or k3 == i3)
      ):
        print(int(k3 * 100 + k2 * 10 + k1))
        break
  else:
    print(-1)