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

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

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

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

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

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

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

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

Buggy 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

Buggy 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

Buggy 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

Buggy 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

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

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

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

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

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

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

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

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

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

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 submission (verdict: Runtime Error):
N = int(input().strip())

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

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

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

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

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

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

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

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

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

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

Fixed submission:
a = list(map(int, input().split()))
if a[0] -a[1] == a[1] - a[2]:
 print("YES")
else:
 print("NO")

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

Fixed submission:
a, b, c = input().split()
x = list(b)
print("A"+x[0]+"C")

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

Fixed submission:
l = input().split()
n = int(l[0])
m = int(l[1])
print((n-1) * (m-1))

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

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

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

Fixed submission:
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 W!=1:
            if column % (W-1) == 0 and column != 0:
                row += 1
                column = 0
            else:
                column += 1
        else:
            row += 1

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


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

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

        c[i].reverse()


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

Fixed submission:
s = input().split()
A = s[0]
B = s[1]
C = s[2]
if A[len(A)-1]==B[0] and B[len(B)-1]==C[0]:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
s = raw_input().split()
A = s[0]
B = s[1]
C = s[2]
if A[len(A)]==B[0] && B[len(B)]==C[0]:
    print('YES')
else:
    print('NO')
Problem p03719 (python)

Fixed submission:
string = input().split()
a = int(string[0])
b = int(string[1])
c = int(string[2])
if a <= c and b >= c:
    print("Yes")
    pass
else:
    print("No")
    pass

Buggy submission (verdict: Runtime Error):
def flatten(nested_list):
    return [e for inner_list in nested_list for e in inner_list]
nk = input().split()
kai = int(nk[0])
banme = int(nk[1])
lis = []
i = 0
while(i < kai):
    c = input().split()
    a = int(c[0])
    b = int(c[1])
    n = 0
    tmplis = [a] * b
    lis.append(tmplis)
    print(lis)
    i += 1
    pass
lis = flatten(lis)
slis = sorted(lis)
ans = slis[banme]
print(ans)

Buggy submission (verdict: Runtime Error):
def flatten(nested_list):
    return [e for inner_list in nested_list for e in inner_list]
nk = input().split()
kai = int(nk[0])
banme = int(nk[1])
lis = []
i = 0
while(i < kai):
    c = input().split()
    a = int(c[0])
    b = int(c[1])
    n = 0
    tmplis = [a] * b
    lis.append(tmplis)
    print(lis)
    i += 1
    pass
lis = flatten(lis)
slis = sorted(lis)
ans = slis[banme]
print(ans)
Problem p03557 (python)

Fixed submission:
# coding: utf-8
import math
import bisect

def calc():
    n = int(input())
    tops = list(map(int, input().split()))
    middles = list(map(int, input().split()))
    lowers = list(map(int, input().split()))
 
    tops = sorted(tops)
    lowers = sorted(lowers)
 
    counter = 0
 
    for i in range(n):
        # A < B
        top_num = bisect.bisect_left(tops, middles[i])
        
        # B < C
        lower_num = n - bisect.bisect_right(lowers, middles[i])
        
        counter += top_num * lower_num
    
    return counter
 
print(calc())

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


n = int(input())

tops = list(map(int, input().split()))
middles = list(map(int, input().split()))
lowers = list(map(int, input().split()))

max_lower = max(lowers)
middles = list(filter(lambda x: x < max_lower, middles))

max_middle = max(middles)
tops = list(filter(lambda x: x < max_middle, tops))

counter = 0
for top in tops:
    for middle in middles:
        if middle <= top:
            continue

        for lower in lowers:
            if lower <= middle:
                continue
            
            counter += 1
            
            
print(counter)
Problem p03759 (python)

Fixed submission:
a, b, c = map(int, input().split())
print('YES' if b - a == c - b else 'NO')

Buggy submission (verdict: Runtime Error):
print(''.join((a + b for a, b in zip(input(), input()+'\n'))).split('\n')[0])

Buggy submission (verdict: Runtime Error):
print(''.join((a + b for a, b in zip(input(), input()+'\n'))).splitlines()[0])
Problem p03565 (python)

Fixed submission:
s_=input()
t=input()
ans=[]
n=len(s_)
m=len(t)
ind=0
dic={}
if m > n:
	print('UNRESTORABLE')
else:
	for i in range(n-m+1):
		con1=True
		for j in range(m):
			if s_[i+j] !=t[j] and s_[i+j]!='?':
				con1=False
				dic.clear()
				break
			else:
				dic[i+j]=t[j]
	
		if con1:
			lis=list(s_)
			if len(dic)!=0:
				for key in dic:
					lis[key]=dic[key]
				lis=''.join(lis)
			lis=lis.replace('?','a')
			ans.append(lis)
			dic.clear()
	if len(ans)!=0:
		ans.sort()
		print(ans[0])
	else:
		print('UNRESTORABLE')

Buggy submission (verdict: Runtime Error):
s_=input()
t=input()
ans=[]
n=len(s_)
m=len(t)
ind=0
dic={}
for i in range(n-m+1):
	con1=True
	for j in range(m):
		if s_[i+j] !=t[j] and s_[i+j]!='?':
			con1=False
			dic.clear()
			break
		else:
			dic[i+j]=t[j]
	
	if con1:
		lis=list(s_)
		if len(dic)!=0:
			for key in dic:
				lis[key]=dic[key]
			lis=''.join(lis)
		lis=lis.replace('?','a')
		ans.append(lis)
		dic.clear()
if con1:
	ans.sort()
	print(ans[0])
else:
	print('UNRESTORABLE')

Buggy submission (verdict: Runtime Error):
s_=input()
t=input()

n=len(s_)
m=len(t)
ind=0
dic={}
for i in range(n-m+1):
	con1=True
	for j in range(m):
		if s_[i+j] !=t[j] and s_[i+j]!='?':
			con1=False
			dic.clear()
			break
		else:
			dic[i+j]=t[j]
if con1:
	lis=list(s_)
	if len(dic)!=0:
		for key in dic:
			lis[key]=dic[key]
		lis=''.join(lis)
	lis=lis.replace('?','a')
	print(lis)
else:
	print('UNRESTORABLE')

Buggy submission (verdict: Runtime Error):
s_=input()
t=input()

n=len(s_)
m=len(t)
ind=0
dic={}
for i in range(n-m+1):
	con1=True
	for j in range(m):
		if s_[i+j] !=t[j] and s_[i+j]!='?':
			con1=False
			dic.clear()
			break
		else:
			dic[i+j]=t[j]
if con1:
	lis=list(s_)
	for key in dic:
		lis[key]=dic[key]
	lis=''.join(lis)
	lis=lis.replace('?','a')
	print(lis)
else:
	print('UNRESTORABLE')
Problem p03625 (python)

Fixed submission:
int(input())
l=[int(x) for x in input().split()]
arr={}
for i in l:
	if not arr.get(i):
		arr[i]=1
	else:
		arr[i]+=1
max1=0
max2=-1
sqr=0
for i in arr:
	if arr[i]>=2:
		if i > max1:
			max1=i
		if arr[i]>=4:
			sol=i**2
			if sqr < sol :
				sqr=sol
for i in arr:
	if arr[i]>=2:
		if i > max2 and i < max1:
			max2=i

rec=max1 * max2
if rec > sqr:
	print(rec)
else:
	print(sqr)

Buggy submission (verdict: Runtime Error):
maxi=1000000001
int(input())
l=[int(x) for x in input().split()]
arr=[0]*maxi
for i in l:
	arr[i]+=1
max1=0
max2=-1
sqr=0
for i in range(maxi):
	if arr[i]>=2:
		if i > max1:
			max1=i
		if arr[i]>=4:
			sol=i**2
			if sqr < sol :
				sqr=sol
for i in range(maxi):
	if arr[i]>=2:
		if i > max2 and i < max1:
			max2=i

rec=max1 * max2
if rec > sqr:
	print(rec)
else:
	print(sqr)
Problem p03643 (python)

Fixed submission:
n = input()
print("ABC" + n )

Buggy submission (verdict: Runtime Error):
n = input().split()
print("ABC" + n)
Problem p03671 (python)

Fixed submission:
ring = list(map(int,input().split()))
print(sum(ring) - max(ring))

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

Fixed submission:
a, b, c, d, e, f = map(int, input().split())
sug, dif2 = 0, 100
s = {}
wat1, wat2 = 100*a, 100*b
cap1, cap2 = a*e, b*e
for i in range(1,f//wat1+1):
    for j in range(f//wat2+1):
        if (wat1+cap1)*i+(wat2+cap2)*j<=f:
            s[cap1*i+cap2*j] = wat1*i+wat2*j
if s == {}:
    dif1 = f-wat1
    for i in range(10):
        for j in range(10):
            if 0<=(f-wat1)-(c*i+d*j)<dif1:
                dif1 = (f-wat1)-(c*i+d*j)
                sug3 = c*i+d*j
    print(wat1+sug3, sug3)
    exit(0)
for i in s.keys():
    for j in range(i//c+1):
        for k in range(i//d+1):
            if 0<=i-(c*j+d*k)<dif2:
                dif2 = i-(c*j+d*k)
                wat,sug1,sug2 = s[i],j,k
print(c*sug1+d*sug2+wat, c*sug1+d*sug2)

Buggy submission (verdict: Runtime Error):
a, b, c, d, e, f = map(int, input().split())
sug, dif2 = 0, 100
s = {}
wat1, wat2 = 100*a, 100*b
cap1, cap2 = a*e, b*e
for i in range(1,f//wat1+1):
    for j in range(f//wat2+1):
        if (wat1+cap1)*i+(wat2+cap2)*j<=f:
            s[cap1*i+cap2*j] = wat1*i+wat2*j
if s == {}:
    dif1 = f - wat1
    for i in range(10):
        for j in range(10):
            if 0<=(f-wat1) - (c*i+d*j)<dif1:
                dif1 = (f-wat1)-(c*i+d*j)
                sug3 = c*i+d*j
    print(wat1+sug3, sug3)
    exit(0)
print(wat,sug1, sug2)
for i in s.keys():
    for j in range(i//c+1):
        for k in range(i//d+1):
            if 0<=i-(c*j+d*k)<dif2:
                dif2 = i-(c*j+d*k)
                wat,sug1,sug2 = s[i],j,k
print(wat,sug1, sug2)
print(c*sug1+d*sug2+wat, c*sug1+d*sug2)

Buggy submission (verdict: Runtime Error):
a, b, c, d, e, f = map(int, input().split())
sug, dif = 0, 100
s = {}
wat1, wat2 = 100*a, 100*b
cap1, cap2 = a*e, b*e

for i in range(1,f//wat1+1):
    for j in range(f//wat2+1):
        if (wat1+cap1)*i+(wat2+cap2)*j<=f:
            s[cap1*i+cap2*j] = wat1*i+wat2*j
for i in s.keys():
    for j in range(i//c+1):
        for k in range(i//d+1):
            if 0<=i-(c*j+d*k)<dif:
                dif = i-(c*j+d*k)
                wat,sug1,sug2 = s[i],j,k
print(c*sug1+d*sug2+wat, c*sug1+d*sug2)

Buggy submission (verdict: Runtime Error):
a, b, c, d, e, f = map(int, input().split())
sug = 0
wat = 100*a
cap = a*e
for i in range(100):
    for j in range(100):
        if (c*i+d*j<=cap) and (wat+c*i+d*j)<=f:
            sug = max(c*i+j*d, sug)
print(wat1+sug, sug)
Problem p03605 (python)

Fixed submission:
n = int(input())
if n%10==9 or n//10==9:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
n = int(input())
if n%10==9 or n//10==9:
  print('Yes')
else;
  print('No')

Buggy submission (verdict: Runtime Error):
n = int(input())
if n%10==9 or n//10==9:
  print('Yes')
else;
print('No')
Problem p03635 (python)

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

Buggy submission (verdict: Runtime Error):
n. m = map(int, input().split())
print((n-1)*(m-1))
Problem p03673 (python)

Fixed submission:
from collections import deque

n = int(input())
a = list(map(int, input().split()))
s = deque([])

for i in range(n):
    if i%2==1:
        s.appendleft(a[i])
    else:
        s.append(a[i])
if n%2 == 1:
    s.reverse()
print(*s)

Buggy submission (verdict: Runtime Error):
from collections import deque

n = int(input())
a = list(map(int, input().split()))
s = deque([])

for i in range(n):
    if i%2==1:
        s.insert(0, a[i])
    else:
        s.append(a[i])
if n%2 == 1:
    s.reverse()
print(*s)

Buggy submission (verdict: Runtime Error):
from collections import deque

n = int(input())
a = list((map(int, input().split())))
s = deque([])

for i in range(n):
    if i%2==1:
        s.insert(0, a[i])
    else:
        s.append(a[i])
if n%2 == 1:
    s.reverse()
print(*s)

Buggy submission (verdict: Runtime Error):
from collections import deque

n = int(input())
a = list((map(int, input().split())))
s = deque([])

for i in range(n):
    if i%2==1:
        s.insert(0, a[i])
    else:
        s.append(a[i])

print(*s)
Problem p03713 (python)

Fixed submission:
def f(x,y,z):
    return max(x,y,z)-min(x,y,z)

h, w = map(int, input().split())
l = []
ans1, ans2 = h*w, h*w
for i in range(1,h//2+1):
        s1 = i*w
        s2 = w*((h-i)//2)
        s3 = h*w-s1-s2
        s4 = (h-i)*(w//2)
        s5 = h*w-s1-s4
        ans1 = min(ans1, f(s1,s2,s3),f(s1,s4,s5))

for i in range(1,w//2+1):
        s1 = i*h
        s2 = h*((w-i)//2)
        s3 = h*w-s1-s2
        s4 = (w-i)*(h//2)
        s5 = h*w-s1-s4
        ans2 = min(ans2, f(s1,s2,s3),f(s1,s4,s5))
print(min(ans1,ans2))

Buggy submission (verdict: Runtime Error):
h, w = map(int, input().split())
long = max(h, w)
short = min(h, w)
if h%3==0 or w%3==0:
    print(0)
else:
    if long%3==1:
        s_max = long//3*short
        s_min = (long-long//3)*(short//2)
    elif long%3==2:
        s_max = (long//3+1)*short
        s_min = (long-(long//3+1))*(short//2)
print(abs(s_max-s_min))
Problem p03813 (python)

Fixed submission:
x = int(input())
if x>=1200:
  print('ARC')
else:
  print('ABC')

Buggy submission (verdict: Runtime Error):
x = int(inout())
if x>1200:
  print('ARC')
else:
  print('ABC')
Problem p03862 (python)

Fixed submission:
N, x = map(int, input().split())
a = list(map(int, input().split()))
count = 0

for i in range(N-1):
    while a[i]+a[i+1] > x:
        if a[i]>x:
           count += a[i]-x
           a[i] = x
        else:
           count += a[i+1] - (x-a[i])
           a[i+1] = x - a[i]

print(count)

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

for i in range(N-1):
  while a[i]+a[i+1]>x:
    if a[i]>a[i+1]:
      a[i] -= 1
      count += 1
    else:
      a[i+1] -= 1
      count += 1

print(count)

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

for i in range(N-1):
   while a[i]+a[i+1] > x:
       if a[i]>a[i+1]:
           a[i] -= 1
          count += 1
      else:
           a[i+1] -= 1
           count += 1

print(count)
Problem p03943 (python)

Fixed submission:
a, b, c = map(int, input().split())
if a+b==c or a+c==b or b+c==a:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
if a+b=c or a+c=b or b+c=a:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
if a+b=c or a+c=b or b+c=a:
  print('Yes')
else:
  print('No
Problem p03997 (python)

Fixed submission:
a = int(input())
b = int(input())
h = int(input())
print((a+b)*h//2)

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

Fixed submission:
key = input()
s = []
for i in key:
  if i == '0' or i == '1':
    s.append(i)
  else:
    if len(s) > 0:
      s.pop(-1)
print(''.join(s))

Buggy submission (verdict: Runtime Error):
key = input()
s = []
for i in key:
  if i == '0' or if i == '1':
    s.append(i)
  else:
    if len(s) > 0:
      s.pop(-1)
print(s)

Buggy submission (verdict: Runtime Error):
key = input()
s = []
for i in key:
  if i == '0' or i == '1':
    s.append(i)
  else:
    len(s) > 0:
      s.pop(-1)
print(s)

Buggy submission (verdict: Runtime Error):
key = input()
s = []
for i in key:
  if i == '0' or if i == '1':
    s.append(i)
  else:
    len(s) > 0:
      s.pop(-1)
print(s)
Problem p04043 (python)

Fixed submission:
array = list(map(int, input().split()))
array.sort()
if array == [5, 5, 7]:
  print('YES')
else:
  print('NO')

Buggy submission (verdict: Runtime Error):
array = list(map(int, input().solit()))
array.sort()
if array == [5, 5, 7]:
  print('YES')
else:
  print('NO')