Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
l = input().split()
print((l[0]-l[2])/(l[1]+l[2]))

Fixed submission:
l = raw_input().split()
print((int(l[0])-int(l[2]))/(int(l[1])+int(l[2])))

Buggy python submission (verdict: Runtime Error):
l = raw_input().split()
print((int(l[0])-int(l[2]))/(int(l[1])+int(l[2])))

Fixed submission:
l = raw_input().split()
print((int(l[0])-int(l[2]))/(int(l[1])+int(l[2])))

Buggy python submission (verdict: Runtime Error):
l = raw_input().split()
print((int(l[0])-int(l[2]))/(int(l[1])+int(l[2])))

Fixed submission:
l = raw_input().split()
print((int(l[0])-int(l[2]))/(int(l[1])+int(l[2])))

Buggy python submission (verdict: Runtime Error):
l = raw_input().split()
print((float(l[0])-float(l[2]))/(float(l[1])+float(l[2])))

Fixed submission:
l = raw_input().split()
print((int(l[0])-int(l[2]))/(int(l[1])+int(l[2])))

Buggy python submission (verdict: Runtime Error):
l = raw_input().split()
h = float(l[0])/(float(l[1])+float(l[2]))
print(int(h-1))

Fixed submission:
l = raw_input().split()
print((int(l[0])-int(l[2]))/(int(l[1])+int(l[2])))

Buggy python submission (verdict: Runtime Error):
l = raw_input().split()
h = int(l[0])/(int(l[1])+int(l[2]))
print(h)

Fixed submission:
l = raw_input().split()
print((int(l[0])-int(l[2]))/(int(l[1])+int(l[2])))

Buggy python submission (verdict: Runtime Error):
l = raw_input().split()
h = int(l[0])/(int(l[1])+int(l[2]))
print(h)

Fixed submission:
l = raw_input().split()
print((int(l[0])-int(l[2]))/(int(l[1])+int(l[2])))

Buggy python submission (verdict: Runtime Error):
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8

import math
import re
import sys
 
args = sys.argv

X = args[0]
Y = args[1]
Z = args[2]

# 人数
a = (X-Z)/(Y+Z)

print(int(a))



Fixed submission:
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
 
import math
import re
import sys
 
args = input().split()

X = args[0]
Y = args[1]
Z = args[2]
 
# 人数
a = (int(X)-int(Z))/(int(Y)+int(Z))
 
print(int(a))

Buggy python submission (verdict: Runtime Error):
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8

import math
import re
import sys
 
args = sys.argv

if __name__ == "__main__":
	X = args[1]
	Y = args[2]
	Z = args[3]
	# 人数
	a = (X-Z)/(Y+Z)

	int(a)

	

Fixed submission:
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
 
import math
import re
import sys
 
args = input().split()

X = args[0]
Y = args[1]
Z = args[2]
 
# 人数
a = (int(X)-int(Z))/(int(Y)+int(Z))
 
print(int(a))
Buggy python submission (verdict: Runtime Error):
N,A = map(int,input().split())
print(N * N - A)

Fixed submission:
N = int(input())
A = int(input())
print(N * N - A)
Buggy python submission (verdict: Runtime Error):
A,B = map(int,input().split())
if A == "H" and B == "H":
    print("H")
elif A == "H" and B == "D":
    print("D")
elif A == "D" and B == "H":
    print("D")
else:
    print("H")


Fixed submission:
A,B = map(str,input().split())
if A == "H" and B == "H":
    print("H")
elif A == "H" and B == "D":
    print("D")
elif A == "D" and B == "H":
    print("D")
else:
    print("H")
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())

print((1900 * M + 100 * (N - M)) * 2**M)

Fixed submission:
X, Y = input().split()
X, Y = int(X, 16), int(Y, 16)

if X < Y:
    print("<")
elif X > Y:
    print(">")
else:
    print("=")
Buggy python submission (verdict: Runtime Error):
H, W = map(int, input().split())
S = [input() for i in range(H)]

ans = []
for i in S:
    ans.append(list(i))

dxy = [(-1, -1), (-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1)]

for y in range(H):
    for x in range(W):
        if S[y][x] == '#':
            continue
        c = 0
        for dx, dy in dxy:
            if x + dx < 0 or x + dx > W - 1 or y + dy < 0 or y + dy > H - 1:
                continue
            if S[y + dy][x + dx] == '#':
                c += 1
        ans[y][x] = c

for row in ans:
    print(''.join(list(map(str, row))))

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

if A == B:
    print(C)
elif B == C:
    print(A)
elif C == A:
    print(B)
Buggy python submission (verdict: Runtime Error):
W, H = map(int, input().split())
src = [input() for i in range(H)]

ans = []
for row in src:
    ans.append(list(row))

dxy = [(-1, -1), (-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1)]
for y in range(H):
    for x in range(W):
        if src[y][x] == '#':
            continue
        c = 0
        for dx,  dy in dxy:
            if x + dx < 0 or x + dx > W - 1 or y + dy < 0 or y + dy > H - 1:
                continue
            if src[y + dy][x + dx] == '#':
                c += 1
        ans[y][x] = c


for row in ans:
    print(''.join(list(map(str, row))))

Fixed submission:
H, W = map(int, input().split())
S = [input() for i in range(H)]

ans = []
for i in S:
    ans.append(list(i))

dxy = [(-1, -1), (-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1)]

for y in range(H):
    for x in range(W):
        if S[y][x] == '#':
            continue
        c = 0
        for dx, dy in dxy:
            if x + dx < 0 or x + dx > W - 1 or y + dy < 0 or y + dy > H - 1:
                continue
            if S[y + dy][x + dx] == '#':
                c += 1
        ans[y][x] = c

for row in ans:
    print(''.join(list(map(str, row))))
Buggy python submission (verdict: Runtime Error):
list = input().split()
x,y,z = list[0],list[1],list[2]
num = x%(y+z)
if num >= y:
    print((x/(y+z))+1)
else:
    print(x/(y+z))

Fixed submission:
list = input().split()
x = list[0]
y = list[1]
dic = {"A":10,
"B":11,
"C":12,
"D":13,
"E":14,
"F":15}
x = dic[x]
y = dic[y]

if x > y:
    print(">")
elif x == y:
    print("=")
else:
    print("<")
Buggy python submission (verdict: Runtime Error):
list = input().split()
x,y,z = list[0],list[1],list[2]
x -= z * 2
num = x % (y+z)
if num >= y:
    print((x//(y+z))+1)
else:
    print(x//(y+z))


Fixed submission:
list = input().split()
x,y,z = int(list[0]),int(list[1]),int(list[2])
x -= z * 2
num = x % (y+z)
if num >= y:
    print((x//(y+z))+1)
else:
    print(x//(y+z))

Buggy python submission (verdict: Runtime Error):
list = input().split()
x,y,z = list[0],list[1],list[2]
num = x%(y+z)
if num >= y:
    print((x/(y+z))+1)
else:
    print(x/(y+z))

Fixed submission:
list = input().split()
x,y,z = int(list[0]),int(list[1]),int(list[2])
x -= z * 2
num = x % (y+z)
if num >= y:
    print((x//(y+z))+1)
else:
    print(x//(y+z))
Buggy python submission (verdict: Runtime Error):
l = map(int, raw_input().split())
N = raw_input
l[0] = Q
l[1] = H
l[2] = S
l[3] = D
if Q*2 > H:
    M1 = H
else:
    M1 = Q*2

if  M1*2 > S:
    M = S
else:
    M = M1*2
if M*2 < D:
    print(M*N)
else:
    if N%2 == 0:
        print(D*(N//2))
    else:
        print(D*(N//2) + M)

Fixed submission:
Q, H, S, D,= map(int, raw_input().split())
N = int(input())
if Q*2 > H:
    M1 = H
else:
    M1 = Q*2

if  M1*2 > S:
    M = S
else:
    M = M1*2
if M*2 < D:
    print(M*N)
else:
    if N%2 == 0:
        print(D*(N//2))
    else:
        print(D*(N//2) + M)

Buggy python submission (verdict: Runtime Error):
Q, H, S, D, N = input(), input(), input(), input(), input()
if Q*2 > H:
    M1 = H
else:
    M1 = Q*2

if  M1*2 > S:
    M = S
else:
    M = M1*2
if M*2 < D:
    print(M*N)
else:
    if N%2 == 0:
        print(D*(N//2))
    else:
        print(D*(N//2) + M)


Fixed submission:
Q, H, S, D,= map(int, raw_input().split())
N = int(input())
if Q*2 > H:
    M1 = H
else:
    M1 = Q*2

if  M1*2 > S:
    M = S
else:
    M = M1*2
if M*2 < D:
    print(M*N)
else:
    if N%2 == 0:
        print(D*(N//2))
    else:
        print(D*(N//2) + M)
Buggy python submission (verdict: Runtime Error):
line1 = sys.stdin.readline().rstrip()
line2 = sys.stdin.readline().rstrip()

len2 = len(line2)

res = True

for i in range(0, len(line1)):
    if line2[len2-1 - i] != line1[i]:
        res = False
        print("NO")
        break

if res == True:
    print("YES")

Fixed submission:
import sys

line1 = sys.stdin.readline().rstrip()
line2 = sys.stdin.readline().rstrip()

len2 = len(line2)

res = True

for i in range(0, len(line1)):
    if line2[len2-1 - i] != line1[i]:
        res = False
        print("NO")
        break

if res == True:
    print("YES")
Buggy python submission (verdict: Runtime Error):
from sys import stdin

curRate = stdin.readline()
targetRate = stdin.readline()

a = targetRate * 2 - curRate

print(a)


Fixed submission:
import sys

cur = sys.stdin.readline()
target = sys.stdin.readline()

a = int(target) * 2 - int(cur)

print (a)

Buggy python submission (verdict: Runtime Error):
from sys import stdin

curRate = stdin.readline()
targetRate = stdin.readline()

a = targetRate * 2 - curRate

print(a)


Fixed submission:
import sys

cur = sys.stdin.readline()
target = sys.stdin.readline()

a = int(target) * 2 - int(cur)

print (a)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
d = list(map(int, input().split()))
m = int(input())
t = list(map(int, input().split()))

ans = "YES"

for p in t:
    if p in d:
        i = d.index(p)
        d[i] = 0
    else:
        ans = "NO"
        break

print(ans)

Fixed submission:
n = int(input())
d = input().split()
m = int(input())
t = input().split()

dic = dict()

for di in d:
    if di in dic:
        dic[di] += 1
    else:
        dic[di] = 1

ans = "YES"
for ti in t:
    if ti not in dic or dic[ti] == 0:
        ans = "NO"
        break
    else:
        dic[ti] -= 1

print(ans)
Buggy python submission (verdict: Runtime Error):
a, b = map(int,input().split())
x, y = abs(a), abs(b)

if a >= 0:
    if b > 0:
        if a > b:
            a, b = map(int,input().split())
x, y = abs(a), abs(b)

if a >= 0:
    if b > 0:
        if a > b:
            ans = abs(x-y) + 2
        else:
            ans = abs(x-y)
            
    else:
        ans = abs(x-y) + 1

else:
    if b >= 0:
        ans = min(abs(x-y)+1, b - a)
    else:
        if b > a:
            ans = abs(x-y)
        else:
            ans = abs(x-y) + 2

print(ans)

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

if a >= 0:
    if b > 0:
        if a > b:
            ans = abs(x-y) + 2
        else:
            ans = abs(x-y)
            
    else:
        ans = abs(x-y) + 1

else:
    if b >= 0:
        ans = min(abs(x-y)+1, b - a)
    else:
        if b > a:
            ans = abs(x-y)
        else:
            ans = abs(x-y) + 2

print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
bonus = N // 15 * 200
print(N * 800 - bonus)

Fixed submission:
A, B = map(int,input().split())
if A == B:
  print("Draw")
elif A > B or A == 1:
  if B == 1:
    print("Bob")
  else:
    print("Alice")
else:
  print("Bob")
Buggy python submission (verdict: Runtime Error):
li = list(map(int,input().split()))
A = li[0]
B = li[1]
C = li[2]
D = li[3]

if A * B > C * D:
  print(A * B)
elif A * B < C * D:
  print(C * D)
else
  print(A * B)

Fixed submission:
li = list(map(int,input().split()))
A = li[0]
B = li[1]
C = li[2]
D = li[3]

if A * B > C * D:
  print(A * B)
elif A * B < C * D:
  print(C * D)
else:
  print(A * B)
Buggy python submission (verdict: Runtime Error):
x=input()
if x[0][0]==x[1][2] & x[0][1]==x[1][1] & x[0][2]==x[1][0]
    print YES
else
	print NO
end


Fixed submission:
s = input()
t = input()
if s[0]==t[2] and s[1]==t[1] and s[2]==t[0]:
	print("YES")
else:
	print("NO")

Buggy python submission (verdict: Runtime Error):
c_11, c_12, c_13 = input()
c_21, c_22, c_23 = input()
if c_11 == c_23 and c_12 == c_22 and c_13 == c_21:
  print(YES)
else:
  print(NO)

Fixed submission:
c_11, c_12, c_13 = input()
c_21, c_22, c_23 = input()
if c_11 == c_23 and c_12 == c_22 and c_13 == c_21:
  print('YES')
else:
  print('NO')
Buggy python submission (verdict: Runtime Error):
n = int(input())
m = int(input())

a =( (n - 1) * (m - 1))

print(a)

Fixed submission:
n, m = map(int, input().split())
print((n-1)*(m-1))

Buggy python submission (verdict: Runtime Error):
n = int(input())
m = int(input())

a = (n - 1) * (m - 1)

print(a)

Fixed submission:
n, m = map(int, input().split())
print((n-1)*(m-1))
Buggy python submission (verdict: Runtime Error):
a, b, c = input().split()
if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
print(’YES’)
else:
print(’NO’)


Fixed submission:
def solve():
    a, b, c = map(str, input().split())
    if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
        ans = "YES"
    else:
        ans = "NO"

    print(ans)

if __name__ == '__main__':
   solve()
Buggy python submission (verdict: Runtime Error):
s1 = input()
s2 = input()
s3 = input()

print (s1[0].upper() + s2[0].upper() + s3[0].upper())

Fixed submission:
def solve():
    a, b, c = map(str, input().split())
    

    print (a[0].upper() + b[0].upper() + c[0].upper())


if __name__ == '__main__':
   solve()

Buggy python submission (verdict: Runtime Error):
s1 = input()
s2 = input()
s3 = input()

print (s1[0].upper() + s2[0].upper() + s3[0].upper())

Fixed submission:
def solve():
    a, b, c = map(str, input().split())
    

    print (a[0].upper() + b[0].upper() + c[0].upper())


if __name__ == '__main__':
   solve()
Buggy python submission (verdict: Runtime Error):
def solve():
    a, b, c = map(int, input().split())
    print((a + b)*c/2)

if __name__ == '__main__':
    solve()

Fixed submission:
a = int(input())
b = int(input())
h = int(input())
print(int((a + b) * h / 2))
Buggy python submission (verdict: Runtime Error):
a = input()
b = input()

if a == d and b == c
    print('YES')
else:
    print('NO')


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

c = a[::-1]
d = b[::-1]

if a == d and b == c:
    print('YES')
else:
    print('NO')

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

c = a[::-1]
d = b[::-1]

if a = d and b = c:
    print('YES')
else:
    print('NO')


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

c = a[::-1]
d = b[::-1]

if a == d and b == c:
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Runtime Error):
import numpy as np

n = input()

for i in range(n):
    a = int(np.sqrt(n - i))
    b = n - i
    if a**2 == b:
        print(b)
        break
    else:
        pass


Fixed submission:
import numpy

n = int(input())

for i in range(n):
    a = int(numpy.sqrt(n - i))
    b = n - i
    if a**2 == b:
        print(b)
        break
    else:
        pass

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

n = input()

for i in range(n):
    a = int(np.sqrt(n - i))
    b = n - i
    if a**2 == b:
        print(b)
        break
    else:
        pass


Fixed submission:
import numpy

n = int(input())

for i in range(n):
    a = int(numpy.sqrt(n - i))
    b = n - i
    if a**2 == b:
        print(b)
        break
    else:
        pass

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

n = input()

for i in range(n):
    a = int(math.sqrt(n - i))
    b = n - i
    if a**2 == b:
        print(b)
        break
    else:
        pass


Fixed submission:
import numpy

n = int(input())

for i in range(n):
    a = int(numpy.sqrt(n - i))
    b = n - i
    if a**2 == b:
        print(b)
        break
    else:
        pass

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

n = input()

for i in range(n):
    a = int(math.sqrt(n - i))
    b = n - i
    if a**2 == b:
        print(b)
        break
    else:
        pass


Fixed submission:
import numpy

n = int(input())

for i in range(n):
    a = int(numpy.sqrt(n - i))
    b = n - i
    if a**2 == b:
        print(b)
        break
    else:
        pass

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

n = input()

for i in range(n):
    a = int(math.sqrt(n - i))
    b = n - i
    if a**2 == b:
        print(a)
        break
    else:
        pass


Fixed submission:
import numpy

n = int(input())

for i in range(n):
    a = int(numpy.sqrt(n - i))
    b = n - i
    if a**2 == b:
        print(b)
        break
    else:
        pass

Buggy python submission (verdict: Runtime Error):
n = input()

for i in range(n):
    a = sqrt(n - i)
    if type(a) is int:
        print(a)
    else:
        pass


Fixed submission:
import numpy

n = int(input())

for i in range(n):
    a = int(numpy.sqrt(n - i))
    b = n - i
    if a**2 == b:
        print(b)
        break
    else:
        pass
Buggy python submission (verdict: Runtime Error):

import operator

def snuke_fest(top_arr, middle_arr, bottom_arr):
    sorted_arrs = list(sorted(arr) for arr in (top_arr, middle_arr, bottom_arr))
    del top_arr
    del middle_arr
    del bottom_arr
    pointers = [0] * 3
    ended = [False] * 3
    min_posi = [None] * len(sorted_arrs[0]) * 3
    min_posi_pointer = 0
    while not all(ended):
        nums = [0] * 3
        mins = [10**9] * 3
        for i in range(3):
            if not ended[i]:
                mins[-(i+1)] = sorted_arrs[i][pointers[i]]
        min_index, min_val = min(enumerate(mins), key = operator.itemgetter(1))
        min_index = 2 - min_index
        pointers[min_index] += 1
        min_posi[min_posi_pointer] = min_index
        min_posi_pointer += 1
        if pointers[min_index] == len(sorted_arrs[0]):
            ended[min_index] = True
    del sorted_arrs
    del pointers
    count = 0
    count_arr = [0, 0, 0]
    count_one_two = 0
    for i in range(len(min_posi)):
        count_arr[min_posi[-(i+1)]] += 1
        try:
            if min_posi[-(i+1)] == 1:
                count_one_two += count_arr[2]
            elif min_posi[-(i+1)] == 0:
                count += count_one_two
        except Exception as e:
            return 0
    return count


if __name__ == "__main__":
    # run_test(find_even, test_pair)
    _ = input()
    top_arr = [int(i) for i in input().split(" ")]
    middle_arr = [int(i) for i in input().split(" ")]
    bottom_arr = [int(i) for i in input().split(" ")]
    print(snuke_fest(top_arr, middle_arr, bottom_arr))
# ===

Fixed submission:
text1 = input()
text2 = input()

if text1 == text2[::-1]:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
text1 = raw_input()
text2 = raw_input()

if text1 == text2[::-1]:
    print("OK")
else:
    print("NO")

Fixed submission:
text1 = input()
text2 = input()

if text1 == text2[::-1]:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
def can_rotate(text):
    lines = text.split("\n")
    return lines[0] == lines[1][::-1]

text = raw_input()

if can_rotate(text):
    print("OK")
else:
    print("NO")

Fixed submission:
text1 = input()
text2 = input()

if text1 == text2[::-1]:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
def calc_dist(N, K, x):
    dists = [2 * min(K - x_i, x_i) for x_i in x]
    return sum(dists)

if __name__ == "__main__":
    run_test(calc_dist, test_pair)
    N = int(raw_input())
    K = int(raw_input())
    x = map(int, raw_input().split())
    print(calc_dist(N, K, x))

Fixed submission:
def calc_dist(N, K, x):
    dists = [2 * min(K - x_i, x_i) for x_i in x]
    return sum(dists)

if __name__ == "__main__":
    N = int(raw_input())
    K = int(raw_input())
    x = map(int, raw_input().split())
    print(calc_dist(N, K, x))
Buggy python submission (verdict: Runtime Error):
N = int(input().strip())

count = 0
while True:
    if (count + 1) ** 2 > N:
        print(count ** 2)
        break
    count += 1

Fixed submission:
line1 = input().strip()
line2 = input().strip()

if line1[0] == line2[2] and line1[1] == line2[1] and line1[2] == line2[0]:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
N = int(input().strip())

count = 0
while True:
    if (count + 1) ** 2 > N:
        print(count ** 2)
        break
    count += 1

Fixed submission:
line1 = input().strip()
line2 = input().strip()

if line1[0] == line2[2] and line1[1] == line2[1] and line1[2] == line2[0]:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
N = int(input().strip())

count = 0
while True:
    if (count + 1) ** 2 > N:
        print(count)
        break
    count += 1

Fixed submission:
line1 = input().strip()
line2 = input().strip()

if line1[0] == line2[2] and line1[1] == line2[1] and line1[2] == line2[0]:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
N = int(input().strip())

count = 0
while True:
    if (count + 1) ** 2 > N:
        print(coun ** 2t)
        break
    count += 1

Fixed submission:
N = int(input().strip())
 
count = 0
while True:
    if (count + 1) ** 2 > N:
        print(count ** 2)
        break
    count += 1

Buggy python submission (verdict: Runtime Error):
count = 0
while True:
    if (count + 1) ** 2 > N:
        print(count)
        break
    count += 1


Fixed submission:
N = int(input().strip())
 
count = 0
while True:
    if (count + 1) ** 2 > N:
        print(count ** 2)
        break
    count += 1
Buggy python submission (verdict: Runtime Error):
=str(input())
T=str(input())
SL=len(S)
TL=len(T)
a=[]
 
for i in range(SL-TL+1):
 
    count=0
 
    for j in range(TL):
 
        if S[i+j] == '?' or S[i+j]==T[j]:
            count += 1
 
    if count==TL:
        ans = S[:i].replace('?','a')+T+S[i+TL:].replace('?','a')
        a.append(ans)
 
if len(a)==0:
    print('UNRESTORABLE')
else:
    a.sort()
    print(ans)

Fixed submission:
S=str(input())
T=str(input())
SL=len(S)
TL=len(T)
a=[]
 
for i in range(SL-TL+1):
 
    count=0
 
    for j in range(TL):
 
        if S[i+j]=='?' or T[j]=='?' or S[i+j]==T[j]:
            count += 1
 
    if count==TL:
        ans = S[:i].replace('?','a')+T+S[i+TL:].replace('?','a')
        a.append(ans)
 
if len(a)==0:
    print('UNRESTORABLE')
else:
    a.sort()
    print(a[0])
Buggy python submission (verdict: Runtime Error):
kis = input()
gus = input()
a = len(kis)
b = len(gus)
c = ""
if a == b:
 for i in range(a) :
  c += kis[i] + gus[i]
else:
  for i in range(b): 
   c += kis[i] + gus[i]
  c += kis[a-1]

print(c)

Fixed submission:
a = list(map(int, input().split()))
if a[0] -a[1] == a[1] - a[2]:
 print("YES")
else:
 print("NO")
Buggy python submission (verdict: Runtime Error):
a1, b1, c1 = input().split()
a = int(a1)
b = int(b1)
c = int(c1)
z = 0
for i in range(a,b+1):
    if i % c == 0:
       z += 1



print (z)

Fixed submission:
a, b, c = input().split()
x = list(b)
print("A"+x[0]+"C")
Buggy python submission (verdict: Runtime Error):
l = input().split()
H = int(l[0])
W = int(l[1])
N = int(input())


c= [[0 for i in range(W)] for j in range(H)]

color_num = [int(i) for i in input().split()]
row = 0
column = 0

for i in range(N):
    index = color_num[i]
    for j in range(0, index):
        c[row][column] = i+1
        if column % (W-1) == 0 and column != 0:
            row += 1
            column = 0
        else:
            column += 1

for i in range(H):
    if i%2 == 1:
        print('change')
        c[i].reverse()


for i in range(0, H):
    for j in range(0, W):
        print(c[i][j], end=' ')
    print('')

Fixed submission:
l = input().split()
n = int(l[0])
m = int(l[1])
print((n-1) * (m-1))
Buggy python submission (verdict: Runtime Error):
number = int(input())
list = map(int,input().split())
yon_num = 0
ni_num = 0
odd_num = 0
for num in list:
    if num%4 == 0:
        yon_num += 1
    elif num%2 == 0:
        ni_num +=1
    else:
        odd_num += 1

    if ni_num != 0:
        nibai = ni_num//2 + ni_num%2

if yon_num >= (odd_num + nibai  + yon_num) // 2 :
    print('Yes')
else:
    print('No')


Fixed submission:
number = int(input())
list = map(int,input().split())
yon_num = 0
ni_num = 0
odd_num = 0
for num in list:
    if num%4 == 0:
        yon_num += 1
    elif num%2 == 0:
        ni_num +=1
    else:
        odd_num += 1

    if ni_num != 0:
        ni_num = ni_num//2 + ni_num%2

if yon_num >= (odd_num + ni_num  + yon_num) // 2 :
    print('Yes')
else:
    print('No')