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

Fixed submission:
x, y = map(int, input().split())
A=[1, 3, 5, 7, 8, 10, 12]
B=[4, 6, 9, 11]
C=[2]
if (x in A and y in A) or (x in B and y in B) or (x in C and y in C):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
A={1, 3, 5, 7, 8, 10, 12}
B={4, 6, 9, 11}
C={2}
x, y = {map(int, input().split())}
print("Yes" if {x, y} <= A or {x, y} <= B or {x, y} <= C else "No")

Buggy submission (verdict: Runtime Error):
A={1, 3, 5, 7, 8, 10, 12}
B={4, 6, 9, 11}
C={2}
x, y = {map(int, input().split())}
print("Yes" if {x, y} <= A or {x, y} <= B or [x, y] <= C else "No")

Buggy submission (verdict: Runtime Error):
A={1, 3, 5, 7, 8, 10, 12}
B={4, 6, 9, 11}
C={2}
print("Yes" if {map(int, input().split())} <= A or \
{map(int, input().split())} <= B or \
{map(int, input().split())} <= C else "No")
Problem p03713 (python)

Fixed submission:
h, w = map(int, input().split())
def choco(H, W):
    ans = float("inf")
    a, b, c = 0, 0, 0
    for i in range(1, H):
        a = i*W
        for j in range(2):
            if j == 0:
                b = (H-i)//2 * W
                c = H*W - a - b 
            else:
                b = (H-i)*(W//2)
                c = H*W - a - b
            ans = min(ans, max(a, b, c) - min(a, b, c))
    return ans

print(min(choco(h, w), choco(w, h)))

Buggy submission (verdict: Runtime Error):
def chco(h, w):
    ans = float("inf")
    a, b, c = 0, 0, 0
    for i in range(1, H):
        a = i*W
        for j in range(2):
            if j == 0:
                b = (H-i)//2 * W
                c = H*W - a - b 
            else:
                b = (H-i)*(W//2)
                c = H*W - a - b
        ans = min(ans, min(max(a, b, c) - min (a, b, c)))
    return ans

print(min(chco(H, W), choco(W, H)))

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

if H*W%3 == 0:
    print(0)

else:
    M = Max(H, W)
    m = min(H, W)
    print(m*(M//2)-(M-M//2)*(m//2))

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

if H*W%3 == 0:
    print(0)

else:
    M = Max(H, W)
    m = min(H, W)
    print(m*(M//2)-(M-M//2)*(m//2)
Problem p03719 (python)

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

Buggy submission (verdict: Runtime Error):
C = int(input())
if A <= C <=B:
    print("Yes")
else:
    print("No")
Problem p03731 (python)

Fixed submission:
N, T = map(int, input().split())
t = list(map(int, input().split()))
t += [T+t[-1]]

ans = 0
for i in range(N):
    ans += min(T, t[i+1] - t[i])

print(ans)

Buggy submission (verdict: Runtime Error):
N, T = map(int, input().split())
t = list(map(int, input().split()))
t += t[-1]*2

ans = 0
for i in range(N):
    ans += min(T, t[i+1] - t[i])

print(ans)
Problem p03738 (python)

Fixed submission:
A = int(input())
B = int(input())
if A > B:
    print("GREATER")
elif A==B:
    print("EQUAL")
else:
    print("LESS")

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
if A > B:
    print("GREATER")
elif A=B:
    print("EQUAL")
else:
    print("LESS")
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):
a, b, c = map(int, input().split())
print("YES" if b-a=c-b else "NO")

Buggy submission (verdict: Runtime Error):
a, b, c =map(int, input().split())
print("YES" if b-a=c-b else "NO")

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

Buggy submission (verdict: Runtime Error):
a, b, c =map(int, input().split())
print("Yes" if b-a=c=b else "No")
Problem p03760 (python)

Fixed submission:
x=list(input())
y=list(input())+['']
for a, b in zip(x, y):
  print(a+b, end='')

Buggy submission (verdict: Runtime Error):
x=list(input())
y=list(input())+''
for a, b in zip(x, y):
  print(a+b, end='')

Buggy submission (verdict: Runtime Error):
o=list(inpput())
e=list(input())+""
for x, y in zip(o,e):
  print(x+y, end="")
Problem p03761 (python)

Fixed submission:
import collections

N = int(input())

S = collections.Counter(list(input()))
for i in range(N-1):
    c = collections.Counter(list(input()))
    S &= c

ans = []
for i in S.items():
    ans += i[0]*i[1]
ans.sort()
print(*ans, sep="")

Buggy submission (verdict: Runtime Error):
import collections

N = int(input())

S = collections.Counter(list(input()))
for i in range(N-1):
    c = collections.Counter(list(input()))
    S &= c

ans = []
for i in S.items():
    ans += i[0]*i[1]
A.sort()
print(*ans, sep="")

Buggy submission (verdict: Runtime Error):
import collections

N = int(input())

c = collections.Counter(input())
for i in range(N-1):
    x = collections.Counter(input())
    ans=[]
    for j in c.keys():
        c[j] = min(c[j], x[j])
        ans.append(j*c[j])
        ans.sort()

print(*ans, sep="")

Buggy submission (verdict: Runtime Error):
import collections

N = int(input())

c = collections.Counter(input())
for i in range(N-1):
    x = collections.Counter(input())
    ans=[]
    for j in c.keys():
        c[j] = min(c[j], x[j])
        ans.append(j*c[j])

print(*ans, sep="")
Problem p03777 (python)

Fixed submission:
a, b=input().split()
if a=='H':
  print(b)
else:
  if b=='D':
    print('H')
  else:
    print('D')

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
if a == "H" and b == "H":
    print("H")
elif a == "D" and b == "D":
    print("H")
else:
    print("D")

Buggy submission (verdict: Runtime Error):
a, b=input().split()
if a=='H':
  print('H')
else:
  if b=='D'
    print('H')
  else:
    print('D')
Problem p03813 (python)

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

Buggy submission (verdict: Runtime Error):
x = input(int())
print("ABC" if x < 1200 else "ARC")

Buggy submission (verdict: Runtime Error):
x = input(int())
print("ABC" if x < 1200 else "ARC")
Problem p03826 (python)

Fixed submission:
A, B, C, D=map(int, input().split())
print(max(A*B, C*D))

Buggy submission (verdict: Runtime Error):
A, B, C, D=map(int, input().split())
print(max(AB, CD))
Problem p03830 (python)

Fixed submission:
import math

N = int(input())
x = math.factorial(N)

ans = 1
i = 2
while i <= x:
    cnt = 1
    while x%i == 0:
        x //= i
        cnt += 1
    ans *= cnt
    i += 1
                
print(ans%(10**9+7))

Buggy submission (verdict: Runtime Error):
import math

N = int(input())
x = math.factorial(N)

ans=1
for i in range(2, 1+int(x**(1/2))):
    cnt = 1
    while x%i == 0:
        x //= i
        cnt += 1
    ans *= cnt
                
print(ans%(10**9+7))

Buggy submission (verdict: Runtime Error):
import math

N = int(input())
x = math.factorial(N)

ans=1
for i in range(2, 1+int(x**(1/2))):
    cnt = 1
    if x%i == 0:
        x = x//i
        cnt += 1
    else:
        break
    ans *= cnt
                
print(1 if N == 1 else ans*2%(10**9+7))
Problem p03860 (python)

Fixed submission:
print("A"+input()[8]+"C")

Buggy submission (verdict: Runtime Error):
s=input()
print("A"s[0]"C")
Problem p03943 (python)

Fixed submission:
list=list(map(int, input().split()))
list.sort()
if list[0]+list[1] == list[2]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
ist=list(map(int, input().split()))
list.sort()
if list[0]+list[1] == list[2]:
    print("Yes")
else:
    print("No")
Problem p03944 (python)

Fixed submission:
W, H, N = map(int,input().split())

Wmin = 0
Wmax = W
Hmin = 0
Hmax = H

for i in range(N):
    x, y, z = map(int,input().split())
    if z == 1:
        Wmin = max(x, Wmin)
    if z == 2:
        Wmax = min(x, Wmax)
    if z == 3:
        Hmin = max(y, Hmin)
    if z == 4:
        Hmax = min(y, Hmax)
if Wmax < Wmin or  Hmax < Hmin:
    print(0)
else:
    print((Wmax-Wmin)*(Hmax-Hmin))

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

Wmin = 0
Wmax = W
Hmin = 0
Hmax = H

for i in range(N):
    x, y, z = map(int,input().split())
    if z == 1:
        Wmin = x
    if z == 2:
        Wmax = x
    if z == 3:
        Hmin = y
    if z == 4:
        Hmax = y

print(min((Wmax-Wmin)*(Hmax-Hmin)), 0)
Problem p03998 (python)

Fixed submission:
A = list(str(input()))
B = list(str(input()))
C = list(str(input()))
X="a"
while True:
    if X == "a":
        if len(A) == 0:
            print("A")
            break
        X = A[0]
        A.pop(0)
    elif X == "b":
        if len(B) == 0:
            print("B")
            break
        X = B[0]
        B.pop(0)
    else:
        if len(C) == 0:
            print("C")
            break
        X = C[0]
        C.pop(0)

Buggy submission (verdict: Runtime Error):
A=list(input())
B=list(input())
A=list(input())
X=A
while True:
    if X[0] == "a":
        X = A
        X.pop(0)
        if len(X) == 0:
            print("A")
            break
    elif X[0] == "b":
        X = B
        X.pop(0)
        if len(X) == 0:
            print("B")
            break
    else:
        X = C
        X.pop(0)
        if len(X) == 0:
            print("C")
            break

Buggy submission (verdict: Runtime Error):
A=list(input())
B=list(input())
A=list(input())
X=A
while True:
    if X[0] == "a":
        X = A
        X.pop(0)
        if len(X) == 0:
            print("A")
    elif X[0] == "b":
        X = B
        X.pop(0)
        if len(X) == 0:
            print("B")
    else:
        X = C
        X.pop(0)
        if len(X) == 0:
            print("C")

Buggy submission (verdict: Runtime Error):
A = str(input())
B = str(input())
C = str(input())
X="a"
while True:
    if X == "a":
        if len(A) == 0:
            print("A")
            break
        X = A[0]
        A.pop(0)
    elif X == "b":
        if len(B) == 0:
            print("B")
            break
        X = B[0]
        B.pop(0)
    else:
        if len(C) == 0:
            print("C")
            break
        X = C[0]
        C.pop(0)

Buggy submission (verdict: Runtime Error):
A = str(input())
B = str(input())
C = str(input())
X="a"
while True:
    if X == "a":
        X = A[0]
        A.pop(0)
        if len(A) == 0:
            print("A")
            break
    elif X == b:
        X = B[0]
        B.pop(0)
        if len(B) == 0:
            print("B")
            break
    else:
        X = C[0]
        C.pop(0)
        if len(C) == 0:
            print("C")
            break

Buggy submission (verdict: Runtime Error):
A = str(input())
B = str(input())
C = str(input())
X=A
while True:
    if X == "a":
        X = A[0]
        A.pop(0)
        if len(A) == 0:
            print("A")
            break
    elif X == b:
        X = B[0]
        B.pop(0)
        if len(B) == 0:
            print("B")
            break
    else:
        X = C[0]
        C.pop(0)
        if len(C) == 0:
            print("C")
            break
Problem p03999 (python)

Fixed submission:
S=input()
ans=0
for i in range(2**(len(S)-1)):
    x = S[0]
    for j in range(len(S)-1):
        if ((i >> j) & 1) == 1:
            x+="+"
        x += S[j+1]
    ans += eval(x)
print(ans)

Buggy submission (verdict: Runtime Error):
S=input()
ans=0
for i in range(2**(len(S)-1)):
    tmp=S[0]
    for j in range(len(S)-1):
        if ((i >> j) & 1) == 1:
            x+="+"
        x+=S[j+1]
    ans+=eval(x)
print(ans)
Problem p04011 (python)

Fixed submission:
N, K, X, Y=[int(input()) for i in range(4)]
if N<=K:
  print(N*X)
else:
  print(K*X+Y*(N-K))

Buggy submission (verdict: Runtime Error):
N, K, X, Y=[int(input()) for i in range(4)]
if N=<K:
  print(N*X)
else:
  print(K*X+Y*(N-K))

Buggy submission (verdict: Runtime Error):
N, K, X, Y=[int(input()) for i in range(4)]
if N=<K:
  print(N*X)
else:
print(K*X+Y*(N-K))

Buggy submission (verdict: Runtime Error):
N, K, X, Y=[int(input()) for i in range(4)]
if N=<K:
  print(K*X)
else:
  print(K*X+Y*(N-K))

Buggy submission (verdict: Runtime Error):
N, K, X, Y=[int(input()) for i in range(4)]
if n=<K:
  print(K*X)
else:
print(K*X+Y*(N-K))
Problem p04044 (python)

Fixed submission:
# 入力
N,L=map(int,input().split())

l=[]
for i in range(N):
  l.append(input())

# ソート
l.sort()

# 出力
print(''.join(l))

Buggy submission (verdict: Runtime Error):
N, L = map(int, input().split())
list=[]
for i in range(N):
    list.append(str(input()))
print("".join(sorted.list()))

Buggy submission (verdict: Runtime Error):
N, L=map(int, input().split())
s=[]
for i in range(n):
  s.append(input())
print(''.join(sorted(s)))

Buggy submission (verdict: Runtime Error):
N, L=map(int, input().split(""))
s=[]
for i in range(n):
  s.append(input())
print(''.join(sorted(s)))

Buggy submission (verdict: Runtime Error):
N, L=map(int, input().split(""))
s=[]
for i in range(n):
  s.append(input())
print(''.join(sorted(s))
Problem p02608 (python)

Fixed submission:
N = int(input())
f = {}

for x in range(1, 110):
	for y in range(1, 110):
		for z in range(1, 110):
			t = x*x+y*y+z*z+x*y+y*z+z*x
			f[t] = (f[t]+1 if t in f.keys() else 1)

for i in range(1,N+1):
    print(f[i] if i in f.keys() else 0)

Buggy submission (verdict: Runtime Error):
N = int(input())
f = {}

for x in range(1, 110):
	for y in range(1, 110):
		for z in range(1, 110):
			t = x*x+y*y+z*z+x*y+y*z+z*x
			f[t] = (f[t]+1 if t in f.keys() else 1)

for i in range(i,N+1):
    print(f[i] if i in f.keys() else 0)
Problem p02937 (python)

Fixed submission:
from bisect import bisect

s,t = input(),input()
n,x,nx,r = len(s),s+s,{},0

for i,c in enumerate(x):
	if nx.get(c) is None:
		nx[c] = []
	nx[c].append(i+1)

for c in t:
	l = nx.get(c)
	if l is None:
		print(-1)
		exit()
	r += l[bisect(l,r%n)]-r%n
print(r)

Buggy submission (verdict: Runtime Error):
s,t = input(),input()
x,r,nx,p = s*2,0,{},'.'

for i,c in enumerate(s):
	if nx.get((c,x[j])) is None:
		nx[('.',c)] = i+1
	else:
		continue
	for j in range(i+1,len(x)):
		if nx.get((c,x[j])) is None:
			nx[(c,x[j])] = j-i

for c in t:
	n = nx.get((p,c))
	if n is None:
		print(-1)
		exit()
	r,p = r+n,c
print(r)
Problem p03023 (python)

Fixed submission:
print((int(input())-2)*180)

Buggy submission (verdict: Runtime Error):
print((int(input()-2)*180)
Problem p03050 (python)

Fixed submission:
N = int(input())
x,r = 1,0

while x*x < N:
	if N%x==0:
		if x>1 and N//(x-1)==N%(x-1):
			r += x-1
		t = N//x-1
		if N//t==N%t:
			r += t
	x += 1

print(r)

Buggy submission (verdict: Runtime Error):
N = int(input())
x,r = 1,0

while x*x <= N:
	if N%x==0:
		if x>1 and N//(x-1)==N%(x-1):
			r += x-1
		t = N//x-1
		if N//t==N%t:
			r += t
	x += 1

print(r)
Problem p03302 (python)

Fixed submission:
a,b = map(int,input().split())
if a+b == 15:
	print('+')
elif a*b == 15:
	print('*')
else:
	print('x')

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
if a+b == 15:
	print('+')
elif a*b == 15:
	print('*')
else
	print('x')
Problem p02548 (python)

Fixed submission:
# coding:utf-8
n = int(input())
ans = 0

for a in range(1, n):
    ans += (n - 1) // a

print(ans)

Buggy submission (verdict: Runtime Error):
# coding:utf-8
n = int(input())
ans = 0

for a in range(n):
    ans += (n - 1) // a

print(ans)
Problem p02641 (python)

Fixed submission:
# coding:utf-8
x, n = map(int, input().split())
p = list(map(int, input().split()))


if n == 0:
    print(x)
else:
    ps = sorted(p)
    tmp = list(range(-201, 200))
    ans_list = list(set(tmp) ^ set(ps))
    ans_list = sorted(ans_list)
    # print(tmp, ans_list)
    diff = []

    for i in ans_list:
        diff.append(abs(i - x))

    print(ans_list[diff.index(min(diff))])

Buggy submission (verdict: Runtime Error):
# coding:utf-8
x, n = map(int, input().split())
p = list(map(int, input().split()))


if n == 0:
    print(x)
else:
    ps = sorted(p)
    tmp = [_ for _ in range(ps[0], ps[-1] + 1)]
    ans_list = list(set(tmp) ^ set(ps))
    # print(tmp, ans_list)
    diff = []

    for i in ans_list:
        diff.append(abs(i - x))
    print(ans_list[diff.index(min(diff))])
Problem p02719 (python)

Fixed submission:
#coding:utf-8
import math
n, k = map(int, input().split())

if n < k:
    print(min(n, abs(n-k)))
elif k == 1 or n == 0 or n%k == 0:
    print(0)
elif n%k != 0:
    print(min(abs(n%k-k), n%k))

Buggy submission (verdict: Runtime Error):
#coding:utf-8
import math
n, k = map(int, input().split())

if n < k:
    print(min(n, k%n))
elif k == 1 or n == 0 or n%k == 0:
    print(0)
elif k % 2 == 0 and n % 2 == 0 and n%k != 0:
    print(n%k)
elif n%k != 0:
    print(min(abs(n%k-k), n%k))

Buggy submission (verdict: Runtime Error):
#coding:utf-8
import math
n, k = map(int, input().split())

if n < k:
    print(n)
elif k == 1 or (k % 2 == 0 and n % 2 == 0):
    print(0)
elif (k % 2 == 0 and n % 2 == 1) or (n % 2 == 0 and l % 2 == 1):
    print(1)
Problem p02818 (python)

Fixed submission:
#coding:utf-8

a, b, k = map(int, input().split())

if k <= a:
    a = a - k
elif a < k and k <= (a + b):
    b = b - (k - a)
    a = 0
elif (a + b) < k:
    a = 0
    b = 0

print(a, b)

Buggy submission (verdict: Runtime Error):
#coding:utf-8
import sys
sys.setrecursionlimit(1000000000000)
a, b, k = map(int, input().split())

for i in range(0, k):
    if a >= 1:
        a = a - 1
    elif b >= 1:
        b = b - 1
    else:
        pass

print(a, b)
Problem p02841 (python)

Fixed submission:
#coding:utf-8
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if d2 == 1:
  print('1')
else:
  print('0')

Buggy submission (verdict: Runtime Error):
#coding:utf-8
n = int(input())
#切り上げ
x = int(-(-n // 1.08))

if x * 1.08 == n:
  print(x)
else:
  print(':(')
Problem p02885 (python)

Fixed submission:
#coding:utf-8
a, b = map(int, input().split())
print(max(0, a - 2*b))

Buggy submission (verdict: Runtime Error):
#coding:utf-8
a, b = map(int, input().split)
print(min(0, a - 2*b))

Buggy submission (verdict: Runtime Error):
#coding:utf-8
a, b = map(int, input().split)
print(max(0, a - 2*b))
Problem p02900 (python)

Fixed submission:
#coding:utf-8
import fractions
#import math
import collections
#素因数分解
def prime_factorial(num):
    fact = []
    for i in range(2, int(num**0.5)+1):
        while num % i == 0:
            fact.append(i)
            num = num // i
    if num != 1:
        fact.append(num)
    return fact

if __name__ == "__main__":
    #最大公約数を素因数分解し、その個数＋1が答え
    a, b = map(int, input().split())
    #g = math.gcd(a, b)
    g = fractions.gcd(a, b)
    #print(g)
    #print(prime_factorial(g))

    c = collections.Counter(prime_factorial(g))
    print(len(list(c.keys())) + 1)

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

#素因数分解
def prime_factorial(num):
    fact = []
    for i in range(2, int(num**0.5)+1):
        while num % i == 0:
            fact.append(i)
            num = num // i
    if num != 1:
        fact.append(num)
        return fact

if __name__ == "__main__":
    #最大公約数を素因数分解し、その個数＋1が答え
    a, b = map(int, input().split())
    #g = math.gcd(a, b)
    g = fractions.gcd(a, b)
    #print(g)

    fact = prime_factorial(g)
    print(len(set(fact)) + 1)

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

#素因数分解
def prime_factorial(num):
    fact = []
    for i in range(2, int(num**0.5)+1):
        if num % i == 0:
            fact.append(i)
            num = num // i
    if num != 1:
        fact.append(num)
        return fact

if __name__ == "__main__":
    #最大公約数を素因数分解し、その個数＋1が答え
    a, b = map(int, input().split())
    #g = math.gcd(a, b)
    g = fractions.gcd(a, b)
    #print(g)
    #最大公約数が1の場合は1しかないのでそのまま出力。それ以外は素因数分解させる
    if g == 1:
        print(1)
    else:
        fact = prime_factorial(g)
        print(len(set(fact)) + 1)
Problem p02922 (python)

Fixed submission:
#coding:utf-8
a, b = map(int, input().split())

#1つタップを増やすとa-1口増えるので、b-1口増やすことを考える
tap = -(-(b-1)//(a-1))
print(tap)

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

if a >= b:
    print(1)
else:
    #1つタップを増やすとa-1口増えるので、b-1口増やすことを考える
    tap = -(-（((b-1)//(a-1)))
    print(tap)
Problem p02923 (python)

Fixed submission:
# coding:utf-8
n = int(input())
h = list(map(int, input().split()))

ans = 0
tmp = 0

for i in range(0, n - 1):
    if h[i] >= h[i + 1]:
        tmp += 1
    else:
        ans = max(tmp, ans)
        tmp = 0

ans = max(tmp, ans)
print(ans)

Buggy submission (verdict: Runtime Error):
#coding:utf-8
n = int(input())
h = list(map(int, input().split()))

ans = []
count = 0

for i in range(0, n-1):
    if h[i] >= h[i+1]:
        count += 1
    else:
        ans.append(count)
        count = 0

print(max(ans))
Problem p03071 (python)

Fixed submission:
#coding:utf-8
a, b = map(int, input().split())

aa = 2*a - 1
ab = a + b
bb = 2*b - 1

print(max(aa, ab, bb))

Buggy submission (verdict: Runtime Error):
# coding:utf-8
n = int(input())
h = list(map(int, input().split()))
counter = 1

#一番西がもっとも高い山ならその時点で終了
if max(h) == h[0]:
    print(counter)
else:
    for i in range(n):
        print(h[0:i+1])
        h_max = max(h[0:i+1])
        if (h[i] >= h_max) and (h[i] > h[0]):
            #print(h[i])
            counter += 1
    print(counter)
Problem p03079 (python)

Fixed submission:
# coding: utf-8
a, b, c = map(int, input().split())

if a == b and b == c and c == a:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
# coding: utf-8
a, b, c = map(int, input.split())

if a = b and b = c and c = a:
    print('Yes')
else:
    print('No')
Problem p03102 (python)

Fixed submission:
#coding:utf-8
n, m, c = map(int, input().split())
b = list(map(int, input().split()))
a = [list(map(int, input().split())) for i in range(n)]

count = 0

for i in range(0, n):
    #n行ごとに答えを計算する。最初はcで初期化
    ans = c
    for j in range(0, m):
        ans += a[i][j] * b[j]
        #m列目になったら判定実施
        if j == m-1 and ans > 0:
            count += 1

print(count)

Buggy submission (verdict: Runtime Error):
#coding:utf-8
import numpy as np
n, m, c = map(int, input().split())
b = list(map(int, input().split()))
a = [list(map(int, input().split())) for i in range(n)]

count = 0

for item in a:
    #A*Bについて、今回は行列の積を求めているのと同じ
    if np.dot(item, b) + c > 0:
        count += 1

print(count)
Problem p03140 (python)

Fixed submission:
#coding:utf-8
n = int(input())
a = input()
b = input()
c = input()
ans = 0
 
for i in range(n):
  ans += len(set([a[i], b[i], c[i]])) - 1 
  
print(ans)

Buggy submission (verdict: Runtime Error):
#coding:utf-8
n = int(input())
a = input()
b = input()
c = input()
ans = 0

for i in range(n):
  ans += len(set(a[i], b[i], c[i])) - 1 
  
print(ans)

Buggy submission (verdict: Runtime Error):
#coding:utf-8
n = int(input())
a, b, c = map(str, input().split())
ans = 0

for i in range(n):
  ans += len(set(a[i], b[i], c[i])) - 1 
  
print(ans)
Problem p03149 (python)

Fixed submission:
#coding:utf-8
n = input().split()

if '1' in n and '9' in n and '7' in n and '4' in n:
  print('YES')
else:
  print('NO')

Buggy submission (verdict: Runtime Error):
#coding:utf-8
n1, n2, n3, n4 = map(str, input().split())
n = ''.join(n1, n2, n3, n4)

if '1'.count(n) == 1 and '9'.count(n) == 1 and '7'.count(n) == 1 and '4'.count(n) == 1:
  print('Yes')
else:
  print('No')
Problem p03150 (python)

Fixed submission:
# coding:utf-8
s = input()
n = len(s)
for i in range(n):
    if s[:i] + s[n-7+i:] == 'keyence':
        print('YES')
        exit()
print('NO')

Buggy submission (verdict: Runtime Error):
# coding:utf-8
s = input()
for i in range(n := len(s))
    if s[:i] + s[n-7+i:] == 'keyence':
        print('YES')
        exit()
print('NO')

Buggy submission (verdict: Runtime Error):
# coding:utf-8
s = input()
for i in range(n := len(s))
	if s[:i] + s[n-7+i:] == 'keyence':
    	print('YES')
		exit()
print('NO')
Problem p03156 (python)

Fixed submission:
#coding:utf-8
n = int(input())
a, b = map(int, input().split())
p = list(map(int, input().split()))

p1 = 0
p2 = 0
p3 = 0

for i in p:
  if i <= a:
    p1 += 1
  elif i >= (a+1) and i <= b:
    p2 += 1
  elif i >= (b+1):
    p3 += 1

print(min(min(p1, p2), p3))

Buggy submission (verdict: Runtime Error):
#coding:utf-8
n = int(input())
a, b = map(int, input().split())
p = list(map(int, input().split()))

p1 = 0
p2 = 0
p3 = 0

for i in p:
  if i <= a:
    p1 += 1
  elif i >= (a+1) and i <= b:
    p2 += 1
  elif i >= (b+1)
    p3 += 1

print(min(min(p1, p2), p3))