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

Fixed submission:
hw=input().split()
h=int(hw[0])
w=int(hw[1])
mx=[1,1,0,-1,-1,-1,0,1]
my=[0,1,1,1,0,-1,-1,-1]
grid=[]
for t in range(h):
	row=list(input())
	grid.append(row)
for i in range(w):
	for j in range(h):
		if grid[j][i]==".":
			ctr=0
			for k in range(8):
				adx=i+mx[k]
				ady=j+my[k]
				if adx>=0 and adx<w and ady>=0 and ady<h:
					if grid[ady][adx]=="#":
						ctr+=1
			grid[j][i]=str(ctr)
for l in range(h):
    print(''.join(grid[l]))

Buggy submission (verdict: Runtime Error):
hw=input().split()
h=int(hw[0])
w=int(hw[1])
mx=[1,1,0,-1,-1,-1,0,1]
my=[0,1,1,1,0,-1,-1,-1]
grid=[]
for t in range(h):
	row=list(input())
	grid.append(row)
for i in range(w):
	for j in range(h):
		if grid[j][i]==".":
			ctr=0
			for k in range(8):
				adx=i+mx[k]
				ady=j+my[k]
				if adx>=0 and adx<w and ady>=0 and ady<h:
					if grid[ady][adx]=="#":
						ctr+=1
			grid[j][i]=ctr
for l in range(h):
    print(''.join(grid[l]))
Problem p03773 (python)

Fixed submission:
num=input().split(" ")
a=int(num[0])
b=int(num[1])
if a+b>=24:
	print(a+b-24)
else:
	print(a+b)

Buggy submission (verdict: Runtime Error):
num=input().split(" ")
a=num[0]
b=num[1]
if a+b>=24:
	print(a+b-24)
else:
	print(a+b)
Problem p03563 (python)

Fixed submission:
# coding: utf-8

R=int(input())
G=int(input())

print((G-R)+G)

Buggy submission (verdict: Runtime Error):
# coding:utf-8
R=int(input())
G=int(input())
print(2G-R)

Buggy submission (verdict: Runtime Error):
# -＊- coding:utf-8 -＊-
R=int(input())
G=int(input())
print(2G-R)
Problem p03593 (python)

Fixed submission:
H,W = map(int,raw_input().split(" "))

matel = {}

for i in range(H):
    line = raw_input()
    for c in line:
        if not c in matel:
            matel[c] = 0
        matel[c] += 1




def cnter():
    cnt4 = 0
    cnt2 = 0
    cnt1 = 0

    for key in matel.keys():
        vs = matel[key]
        while vs >= 4:
            cnt4+=1
            vs-=4
        while vs >= 2:
            cnt2 += 1
            vs-=2
        cnt1 +=vs

    return cnt1,cnt2,cnt4



def solve():
    cnt1,cnt2,cnt4 = cnter()

    if H%2 == 0 and W%2 == 0:
        if cnt2 == 0 and cnt1 == 0:
            print "Yes"
        else:
            print "No"
    elif H%2 == 1 and W%2 == 1:
        if cnt1 != 1:
            print "No"
            return
        po = (W/2)+(H/2) - cnt2
        if po < 0:
            print "No"
            return

        if po %2 == 0:
            print "Yes"
        else:
            print "No"

    else:
        if cnt1:
            print "No"
            return 
        if H%2 == 1:
            po = W/2 - cnt2
        else:
            po = H/2 - cnt2

        if po < 0:
            print "No"
            return
        if po % 2 == 0:
            print "Yes"
        else:
            print "No"

solve()

Buggy submission (verdict: Runtime Error):
H,W = map(int,raw_input().split(" "))

matel = {}

for i in range(H):
    line = raw_input()
    for c in line:
        if not c in matel:
            matel[c] = 0
        matel[c] += 1




def cnter():
    cnt4 = 0
    cnt2 = 0
    cnt1 = 0

    for key in matel.keys():
        vs = matel[key]
        while vs >= 4:
            cnt4+=1
            vs-=4
        while vs >= 2:
            cnt2 += 1
            vs-=2
        cnt1 +=vs

    return cnt1,cnt2,cnt4



def solve():
    cnt1,cnt2,cnt4 = cnter()

    if H%2 == 0 and W%2 == 0:
        if cnt2 == 0 and cnt1 == 0:
            print "Yes"
        else:
            print "No"
    elif H%2 == 1 and W%2 == 1:
        if cnt1 != 1:
            print "No"
            return
        po = (W/2)+(H/2) - cnt2
        if po < 0:
            print "No"
            return

        if po %2 == 0:
            print "Yes"
        else:
            print "No"

    else:
        if cnt1:
            print "No"
            return 
        if H%2 == 1:
            po = W/2 -cnt2
        else:
            pos = H/2 - cnt2

        if po < 0:
            print "No"
            return
        if po % 2 == 0:
            print "Yes"
        else:
            print "No"

solve()
Problem p03957 (python)

Fixed submission:
S = raw_input()
c = 0
f = 0
for s in S:
    if s == "C":
        c = 1
    if s == "F" and c:
        f = 1
print "Yes" if f else "No"

Buggy submission (verdict: Runtime Error):
N = input()
T = map(int,raw_input().split(" "))
A = map(int,raw_input().split(" "))




note = [1 for i in range(N)]
fx = [0 for i in range(N)]

def solve():
    global note
    if T[-1] != A[0]:
        return 0
    
    prev = 0
    for i in range(N):
        if prev > T[i]:
            return 0
        elif prev == T[i]:
            note[i] = prev
        else:
            note[i] = 1
            prev = T[i]
            fx[i] = T[i]
    prev = 0
    for i in range(N-1,-1,-1):
        if prev > A[i]:
            return 0
        elif prev == A[i]:
            if not fx[i]:
                note[i] = min(note[i],prev)
            else:
                if fx[i] > A[i]:
                    return 0

        else:
            if fx[i] and fx[i] != A[i]:
                return 0
            note[i] = 1
            prev = A[i]

    ans = 1
    for i in range(N):
        if not fx[i]:
            ans = (ans * note[i])%(10**9+7)
    return ans



    





print solve()
Problem p03377 (python)

Fixed submission:
A,B,X=map(int,input().split())
if A+B>=X:
    if A<=X:
        print('YES')
    else:
        print('NO')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
A,B,X=map(int,input().split())
if A+B<=X:
    if a<=X:
        print('YES')
    else:
        print('NO')
else:
    print('NO')
Problem p03813 (python)

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

Buggy submission (verdict: Runtime Error):
if x<1200:
    print('ABC')
else:
    print('ARC')
Problem p03852 (python)

Fixed submission:
c=input()
if c=='a' or c=='i' or c=='u' or c=='e' or c=='o':
    print('vowel')
else:
    print('consonant')

Buggy submission (verdict: Runtime Error):
c=input()
if c==a or c==i or c==u or c==e or c==o:
    print('vowel')
else:
    print('consonant')
Problem p03943 (python)

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

Buggy submission (verdict: Runtime Error):
if a+b==c or b+c==a or c+a==b:
    print('Yes')
else:
    print('No')
Problem p03308 (python)

Fixed submission:
q=input()
a=input().split()
b=[int(i) for i in a]
maximum=max(b)
minimum=min(b)
print(maximum-minimum)

Buggy submission (verdict: Runtime Error):
q=input()
a=input().split()
b=map(int,a)
maximum=max(b)
minimum=min(b)
print(maximum-minimum)

Buggy submission (verdict: Runtime Error):
a=input().split()
b=map(int,a)
maximum=max(b)
minimum=min(b)
print(maximum-minimum)
Problem p03316 (python)

Fixed submission:
a=int(input())
l=[int(i) for i in list(str(a))]
s=0
for i in l:
  s+=i
if a % s==0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a=input()
l=[int(i) for i in list(str(a))]
s=0
for i in l:
  s+=i
if a % s==0:
  print("Yes")
else:
  print("No")
Problem p03337 (python)

Fixed submission:
a=input()
b=a.split()
c=[int(i) for i in b]
t=c[0]+c[1]
h=c[0]-c[1]
k=c[0]*c[1]
ans=max([t,h,k])
print(ans)

Buggy submission (verdict: Runtime Error):
a=input()
b=a.split()
c=[int(i) for i in b]
t=c[0]+c[1]
h=c[0]-c[1]
k=c[0]*c[1]
ans=max([t,h,c])
print(ans)
Problem p03360 (python)

Fixed submission:
a=input().split()
b=int(input())
c=[int(i) for i in a]
d=0
for j in c:
  d+=j
d=d-max(c)
d=d+(max(c))*(2**b)
print(d)

Buggy submission (verdict: Runtime Error):
a=input().split()
b=input()
c=[int(i) for i in a]
d=0
for j in c:
  d+=j
d=d-max(c)
d=d+(max(c))*(2**b)
Problem p03408 (python)

Fixed submission:
N = int(input())
s = [input() for i in range(N)]
M = int(input())
t = [input() for i in range(M)]

# 別のインスタンスを作成する
s2 = s[:]
# 和集合をとる
set(s2)
ans = 0

for i in s2:
    if ans < s.count(i) - t.count(i):
        ans = s.count(i) - t.count(i)

print(ans)

Buggy submission (verdict: Runtime Error):
# 青の文字の辞書にtupleの1つ目に数を数える
# 赤の文字の辞書のtupleの２つ目に数を数える
# 青 -　赤を計算する

N = int(input())
s = [input() for i in range(N)]
M = int(input())
t = [input() for i in range(N)]

# 別のインスタンスを作成する
s2 = s[:]
set(s2)
ans = 0

for i in s2:
    if ans < s.count(i) - t.count(i):
        ans = s.count(i) - t.count(i)

print(ans)

Buggy submission (verdict: Runtime Error):
# 青の文字の辞書にtupleの1つ目に数を数える
# 赤の文字の辞書のtupleの２つ目に数を数える
# 青 -　赤を計算する

N = int(input())
s = [input() for i in range(N)]
M = int(input())
t = [input() for i in range(N)]

# 別のインスタンスを作成する
s2 = s[:]

# 
ans = 0

for i in s2:
    if ans < s.count(i) - t.count(i):
        ans = s.count(i) - t.count(i)

print(ans)
Problem p03308 (python)

Fixed submission:
N = int(input())
A_list = list(map(int, input().split()))
print(max(A_list) - min(A_list))

Buggy submission (verdict: Runtime Error):
N = int(input())
A_list = list(map(int, input().split()))
B_list = [a - (i + 1) for i, a in enumerate(A_list)]
B_list.sort()
b = B_list[len(B_list) / 2]
s = sum([abs(B - b) for B in B_list])
print(s)
Problem p03316 (python)

Fixed submission:
N = input()
s = 0
for n in N:
  s += int(n)
res = int(N) % s
if res == 0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N = input()
s = 0
for n in N:
  s += int(n)
res = int(N) % s
if res == 0:
  print("Yes")
else
  print("No")

Buggy submission (verdict: Runtime Error):
N = input()
sum = 0
for n in N:
  sum += int(n)
res = int(N) % sum
if res == 0:
  print("Yes")
else
  print("No")

Buggy submission (verdict: Runtime Error):
N = input()
sum = 0
for n in N:
  sum += int(n)
res = int(N) % sum
if res == 0:
  print("Yes")
else
  print("No")

Buggy submission (verdict: Runtime Error):
N = input()
sum = 0
for n in N:
  sum += int(n)
res = int(N) % sum
if res == 0:
  print("yes")
else
  print("no")
Problem p03337 (python)

Fixed submission:
A, B = map(int,input().split(" "))
m = max(A*B, A+B, A-B)
print(m)

Buggy submission (verdict: Runtime Error):
A,B=map(int,input())
m = max(A*B, A+B, A-B)
print(m)
Problem p03361 (python)

Fixed submission:
H, W = map(int, input().split())
matrix = []
for _ in range(H):
    row = input()
    matrix.append(row)
no_flag = False
for i, row in enumerate(matrix):
    for j, y in enumerate(row):
        if y == '#':
            if j != 0 and matrix[i][j - 1] == '#':
                continue
            elif j != W - 1 and matrix[i][j + 1] == '#':
                continue
            elif i != 0 and matrix[i - 1][j] == '#':
                continue
            elif i != H - 1 and matrix[i + 1][j] == '#':
                continue
            else:
                no_flag = True
                break
    if no_flag == True:
        print('No')
        break
else:
    print('Yes')

Buggy submission (verdict: Runtime Error):
H, W = map(int, input().split())
matrix = []
for _ in range(H):
    row = input().split()
    matrix.append(row)
no_flag = False
for i, x in matrix:
    for j, y in matrix[i]:
        if y == '#':
            if j != 0 and matrix[i][j - 1] == '#':
                continue
            elif j != W - 1 and matrix[i][j + 1] == '#':
                continue
            elif i != 0 and matrix[i - 1][j] == '#':
                continue
            elif i != H - 1 and matrix[i + 1][j] == '#':
                continue
            else:
                no_flag = True
                break
    if no_flag == True:
        print('No')
else:
    print('Yes')
Problem p03434 (python)

Fixed submission:
N = int(input())
alist = list(map(int, input().split(" ")))
alist.sort()
alist.reverse()
score_a = sum(alist[::2])
score_b = sum(alist[1::2])
print(score_a - score_b)

Buggy submission (verdict: Runtime Error):
N = int(input())
alist = map(int, input().split())
alist.sort()
alist.reverse()
score_a = sum(alist[::2])
score_b = sum(alist[1::2])
print(score_a - score_b)
Problem p03471 (python)

Fixed submission:
N, Y = map(int, input().split(" "))
found = False
for x in range(N + 1):
    if 10000 * x + 5000 * (N - x) + 1000 * (N - x) < Y:
        continue
    for y in range(N - x + 1):
        if 10000 * x + 5000 * y + 1000 * (N - x - y) == Y:
            print("{} {} {}".format(x,y,N - x - y))
            found = True
            break
        if found:
            break
    if found:
        break
else:
    print("-1 -1 -1")

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split(" "))
found = False
for x in range(N + 1):
    if 10000 * x + 5000 * (N - x) + 1000 * (N - x) < Y:
        continue
    for y in range(N - x + 1):
        if 10000 * x + 5000 * y + 1000 * (N - x - y) == Y:
            print("{} {} {}".format(x,y,z))
            found = True
            break
        if found:
            break
    if found:
        break
else:
    print("-1 -1 -1")

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split(" "))
for x in range(N + 1):
    for y in range(N - x + 1):
        for z in range(N - x - y + 1):
            if Y === 10000 * x + 5000 * y + 1000 * z:
                print("{} {} {}".format(x,y,z))
                break
print("-1 -1 -1")

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split(" "))
for x in range(N + 1):
    for y in range(N - x + 1):
        for z in range(N - x - y + 1):
            if Y = 10000 * x + 5000 * y + 1000 * z:
                print("{} {} {}".format(x,y,z))
                break
print("-1 -1 -1")
Problem p03607 (python)

Fixed submission:
N = int(input())
aset = set()
for _ in range(N):
    a = int(input())
    if a in aset:
        aset.remove(a)
    else:
        aset.add(a)
print(len(aset))

Buggy submission (verdict: Runtime Error):
N = int(input())
aset = set()
for _ in range(N):
    a = int(input())
    if a in aset():
        aset.remove(a)
    else:
        aset.add(a)
print(len(aset))
Problem p03611 (python)

Fixed submission:
from collections import defaultdict as dd
N = input()
a_raw = list(map(int, input().split()))
num_count = dd(int)
for item in a_raw:
    num_count[item] += 1
    num_count[item-1] += 1
    num_count[item+1] += 1
print(max(num_count.values()))

Buggy submission (verdict: Runtime Error):
N = int(input())
alist = list(map(int, input().split()))
aset = set(alist)
max_num = 0
X = 0
for x in xset:
    num = len([xx for xx in alist if x == xx])
    if max_num < num:
        max_num = num
        X = x
max_num = 0
for x in [X - 1, X, X + 1]:
    num = len([xx for xx in alist if x - 1 <= xx <= x + 1])
    max_num = max(max_num, num)
print(max_num)

Buggy submission (verdict: Runtime Error):
N = int(input())
alist = list(map(int, input().split()))
min_x, max_x = min(alist), max(alist)
max_num = 0
for x in range(min_x, max_x + 1):
    num = len([xx for xx in alist if x -1 <= xx <== x + 1])
    max_num = max(max_num, num)
print(max_num)
Problem p03680 (python)

Fixed submission:
N = int(input())
alist = []
for _ in range(N):
    alist.append(int(input()))
i = 1
for n in range(N):
    i = alist[i - 1]
    if i == 2:
        print(n + 1)
        break
else:
    print(-1)

Buggy submission (verdict: Runtime Error):
N = int(input())
alist = []
for _ in range(N):
    alist.append(int(input()))
i = 1
for n in range(N):
    i = alist[i - 1]
    if i == 2:
        print(len(n + 1))
        break
else:
    print(-1)

Buggy submission (verdict: Runtime Error):
N = int(input())
alist = []
for _ in range(N):
    alist.append(int(input()))
i = 1
for _ in range(N):
    i = alist[i - 1]
    if i == 2:
        print(len(history))
        break
else:
    print(-1)
Problem p03386 (python)

Fixed submission:
a, b, k = [int(m) for m in input().split(" ")]

for i in range(a, min(a+k, b+1)):
    print(i)
for i in range(max(b+1-k, a+k), b+1):
    print(i)

Buggy submission (verdict: Runtime Error):
a, b, k = [int(m) for m in input().split(" ")]

nums = range(a, b+1) if b-a <= k else list(range(a, a+k)) + list(range(b+1-k, b+1))
nums.sort()
for num in nums:
    print(num)

Buggy submission (verdict: Runtime Error):
a, b, k = [int(m) for m in input().split(" ")]

ab_nums = list(range(a, b+1))
end_nums = list(set(ab_nums[:k] + ab_nums[-k:]))
end_nums.sort()

for num in end_nums:
    print(num)

Buggy submission (verdict: Runtime Error):
a, b, k = [int(m) for m in input().split(" ")]

ab_nums = list(range(a, b+1))
end_nums = ab_nums[:k] + ab_nums[-k:]
end_nums.sort()

for num in end_nums:
    print(num)
Problem p03423 (python)

Fixed submission:
n = int(input())

print(n//3)

Buggy submission (verdict: Runtime Error):
# https://abc089.contest.atcoder.jp/tasks/abc089_c

import copy

n = int(input())
s = [input().replace("\n", "") for i in range(n)]
march_num_list = [0, 0, 0, 0, 0]

for name in s:
    for i, head in enumerate(("M", "A", "R", "C", "H")):
        if name[0] == head:
            march_num_list[i] += 1

pattern_num = 0

for i in range(len(march_num_list)):
    two_list = copy.copy(march_num_list)
    two_list.pop(i)
    for j in range(len(two_list)):
        three_list = copy.copy(two_list)
        three_list.pop(j)
        for k in range(len(three_list)):
            pattern_num += 1

print(pattern_num)

Buggy submission (verdict: Runtime Error):
# https://abc089.contest.atcoder.jp/tasks/abc089_c

import copy

n = int(input())
s = [input().replace("\n", "") for i in range(n)]
march_num_list = [0, 0, 0, 0, 0]

for name in s:
    for i, head in enumerate(("M", "A", "R", "C", "H")):
        if name[0] == head:
            march_num_list[i] += 1

pattern_num = 0

for i in range(len(march_num_list)):
    two_list = copy.copy(march_num_list)
    two_list.pop(i)
    for j in range(len(two_list)):
        three_list = copy.copy(two_list)
        three_list.pop(j)
        for k in range(len(three_list)):
            pattern_num += 1

print(pattern_num)
Problem p03427 (python)

Fixed submission:
n = int(input())

def digit_sum_simple(n):
    
    max_sum = -1

    for i in range(10**(len(str(n))-1)-1, n+1):
        
        i_parts = []
        for i_part in str(i):
            i_parts.append(int(i_part))

        this_sum = sum(i_parts)
        
        if max_sum < this_sum:
            max_sum = this_sum
            max_sum_i = i

    return max_sum, max_sum_i

def digit_sum_temp(n):
    max_sum_i = int(str(int(str(n+1)[0])-1) + "9"*(len(str(n+1))-1))
    max_sum = sum([int(j) for j in str(max_sum_i)])

    return max_sum

print(digit_sum_temp(n))

Buggy submission (verdict: Runtime Error):
max_sum_i = int(str(n)[0]) * 10**(len(str(n))-1) -1
max_sum = sum([int(i) for i in str(max_sum_i)])

print(max_sum)
Problem p03433 (python)

Fixed submission:
n = int(input())
a = int(input())

if n % 500 <= a:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
if N % 500 <= A:
    print("Yes")
else:
    print("No")
Problem p03434 (python)

Fixed submission:
n = int(input())
a = [int(i) for i in input().split(" ")]

a.sort()
m = n % 2

alice = 0
bob = 0

while n > 0:
    if n % 2 == m:
        alice += a[-1]
    else:
        bob += a[-1]
    a.pop()
    n -= 1

print(alice - bob)

Buggy submission (verdict: Runtime Error):

n = int(input())
a = input().split(" ")

a.sort()
m = n % 2

alice = 0
bob = 0

while n > 0:
    if n % 2 == m:
        alice += a[-1]
    else:
        bob += a[-1]
    a.pop()
    n -= 1

print(alice - bob)
Problem p03469 (python)

Fixed submission:
s = input()

print(s.replace("2017", "2018"))

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

s[3] = "8"
print(s)
Problem p03738 (python)

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

if a>b:
    print("GREATER")
elif a<b:
    print("LESS")
else:
    print("EQUAL")

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

if a>b:
    print("GREATER")
elif a<b:
    print("LESS")
else:
    prin("EQUAL")
Problem p03635 (python)

Fixed submission:
n, m  = (int(i) for i in input().split())
if m > 1:
	gaiku = (n-1)*(m-1)
print(gaiku)

Buggy submission (verdict: Runtime Error):
N = int(input())
al = [int(a) for a in input().split()]
a = [ "4" if al[i]%4==0 else "k" if al[i]%2!=0 else "g" for i in range(N)]
if a.count("k") == a.count("4"):
	print("Yes")
elif (a.count("k") - 1) == a.count("4")  and a.count("g")==0:
	print("Yes")
else:
	print("No")
Problem p03637 (python)

Fixed submission:
N = int(input())
al = [int(an) for an in input().split()]
a = [ "4" if al[i]%4==0 else "k" if al[i]%2!=0 else "g" for i in range(N)]
if a.count("k") == a.count("4") or len(a) == a.count("g") + a.count("4"):
	print("Yes")
elif (a.count("k") - 1) == a.count("4")  and a.count("g")==0:
	print("Yes")
else:
	print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
al = [int(an) for an in input().split()]
a = [ "4" if al[i]%4==0 else "k" if al[i]%2!=0 else "g" for i in range(N)]
print(a)
if a.count("k") == a.count("4") or len(a) == a.count(g):
	print("Yes")
elif (a.count("k") - 1) == a.count("4")  and a.count("g")==0:
	print("Yes")
else:
	print("No")
Problem p03308 (python)

Fixed submission:
n = int(input())
n_list = list(map(int,input().split()))
n_list.sort()
print(n_list[-1] - n_list[0])

Buggy submission (verdict: Runtime Error):
n = int(input())
n_list = list(map(int,input().split())
n_list.sort()
print(n_list[-1] - n_list[0])
Problem p03351 (python)

Fixed submission:
a,b,c,d = map(int,input().split())
e = abs(a - c)
f = abs(a - b)
g = abs(b - c)
if e <= d:
  print("Yes")
elif f <= d and g <= d:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a,b,c,d = map(int,input().split())
e = abs(a - c)
f = abs(a - b)
g = abs(b - c)
if e <= d:
  print("Yes")
elif f <= d and g <= d
  print("Yes")
else:
  print("No")
Problem p03359 (python)

Fixed submission:
a,b = map(int,input().split())
c = a - 1
if b<a :
  print(c)
else:
  print(a)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if b<=a:
  if a = 1 or a = 12 :
    print(a)
  else:
    print(a+1)
else:
  print(a)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if b<=a:
  if a = 1:
    print(a)
  else:
    print(a+1)
else:
  print(a)
Problem p03455 (python)

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

Buggy submission (verdict: Runtime Error):
a,b = map(int(),input().split())
c = a*b
d = c%2
if d==1:
  print("Odd")
else:
  print("Even")
Problem p03308 (python)

Fixed submission:
# -*- coding: utf-8 -*-
# 桁数の入力
a = input()
# スペース区切りの整数の入力
b = input().split()
b = list(map(int, b))
print(max(b) - min(b))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# 桁数の入力
a = input()
# スペース区切りの整数の入力
b = input().split()
b = list(map(int, b))
print(max(a) - min(a))
Problem p03309 (python)

Fixed submission:
# -*- coding: utf-8 -*-
# 桁数の入力
a = int(input())
# スペース区切りの整数の入力
b = input().split()
b = list(map(int, b))
c = list(range(1, a + 1))

d = []
for i, j in zip(b, c):
    d.append(i-j)
d.sort()
e = d[a // 2]
f = 0
for i in range(a):
    f += abs(d[i]-e)

print(f)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# 桁数の入力
a = int(input())
# スペース区切りの整数の入力
b = input().split()
b = list(map(int, b))
c = list(range(1, a + 1))
d = []
for i, j in zip(b, c):
    d.append(i-j)

d.sort()
e = d[a // 2]
f = 0
for i in range(5):
    f += abs(d[i] - e)
print(f)