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

Fixed submission:
S = input()
print(min(abs(int(S[i:i+3]) - 753) for i in range(len(S) - 2)))

Buggy submission (verdict: Runtime Error):
1 S = input()
2 print(min(abs(int(S[i:i+3]) - 753) for i in range(len(S) - 2)))
Problem p03773 (python)

Fixed submission:
a,b = map(int, input().split())
if a+b > 23:
  print(a+b-24)
else:
  print(a+b)

Buggy submission (verdict: Runtime Error):
a,b = map(int, input(),split())
if a+b > 23:
  print(24-a+b)
else:
  print(a+b)
Problem p03777 (python)

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

Buggy submission (verdict: Runtime Error):
a,b = map(str, input())
if a == 'H':
  print(b)
else:
  if b == 'H':
    print(a)
  else:
    print('H')
Problem p03852 (python)

Fixed submission:
a = input()
l = ['a', 'i', 'u', 'e', 'o']

if a in l:
  print("vowel")
else:
  print("consonant")

Buggy submission (verdict: Runtime Error):
a = input()
if a=='a' | a=='e' | a=='i' | a == 'o' | a == 'u':
  print("vowel")
else:
  print("consonant")

Buggy submission (verdict: Runtime Error):
a = input()
if a=='a' || a=='e' || a=='i' || a == 'o' || a == 'u':
  print("vowel")
else:
  print("consonant")
Problem p03860 (python)

Fixed submission:
a,b,c = map(str, input().split())
print(str.upper(a[0])+str.upper(b[0])+str.upper(c[0]))

Buggy submission (verdict: Runtime Error):
a,b,c = map(str, input().split())
print(upper(a[0])+upper(b[0])+upper(c[0]))
Problem p04043 (python)

Fixed submission:
a = list(map(int, input().split()))
count = 0
count1 = 0
for i in range(3):
  if a[i] == 5:
    count+=1
  elif a[i] == 7:
    count1+=1
    
if (count == 2) & (count1 == 1):
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
a = list(map(int, input().split()))
count = 0
count1 = 0
for i in range(3):
  if a[i] == 5:
    count++
  elif a[i] == 7:
    count1++
    
if count == 2 & count1 == 1:
  print("YES")
else:
  print("NO")
Problem p02731 (python)

Fixed submission:
l = int(input())
print((l/3)**3)

Buggy submission (verdict: Runtime Error):
l = int(input())
print((l/3)***3)
Problem p02952 (python)

Fixed submission:
N=int(input())
count=0
for i in range(1,N+1):
    if len(str(i))%2==1:
        count +=1
print(count)

Buggy submission (verdict: Runtime Error):
X=input()
s=input()
s=s.replace(X,"")
print(s)
Problem p03254 (python)

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


if sum(a)<x:
    print(N-1)
else:
    for i in range(len(a)):
        if x>=a[i]:
            x -= a[i]
            ans += 1
        else:
            break
    print(ans)

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


if sum(a)<x:
    print(N-1)
else:
    for i in range(len(A)):
        if X>=a[i]:
            x -= a[i]
            ans += 1
        else:
            break
Problem p03502 (python)

Fixed submission:
n = input()
m = list(n)

m = list(map(int,m))
if int(n) % sum(m) == 0:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n = input()
m = list(n)
print(m)

if int(n) % sum(m) == 0:
    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 p02658 (python)

Fixed submission:
n = input()
ar = map(int,input().split())
ar = list(ar)
mul=1
ar=sorted(ar)

for i in ar:
	mul*=i
	if mul>10**18:
		break
if mul>10**18:
	print(-1)
else:
	print(mul)

Buggy submission (verdict: Runtime Error):
n = int(input())
ar = map(int,input.split())
mul = 1
for i in ar:
  mul*=i
  if mul>1000000000000000000:
    break
if mul>1000000000000000000:
  print(-1)
else:
  print(mul)
Problem p02958 (python)

Fixed submission:
N = int(input())
p = [int(i) for i in input().split()]
check = 0
pp = sorted(p)
for i in range(N):
    if p[i] != pp[i]:
        check += 1

if check == 2 or check == 0:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
N = int(input())
p = [int(i) for i in input().split()]
check = 0
pp = sorted(p)
for i in range(N):
    if p[i] != p[i + 1]:
        check += 1

if check == 2:
    print('YES')
else:
    print('NO')
Problem p03126 (python)

Fixed submission:
N, M = map(int, input().split())
check = [0] * M
for i in range(N):
    a = [int(i) - 1 for i in input().split()]
    a = a[1:]
    for j in a:
        check[j] += 1


ans = 0
for i in check:
    if i == N:
        ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
check = [0] * M
for i in range(N):
    a = [int(i - 1) for i in input().split()]
    a = a[1:]
    for j in check:
        check[j] += 1
    

ans = 0
for i in check:
    if i == N:
        ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
check = [1] * M
for i in range(N):
    a = [int(i) for i in input().split()]
    a = a[1:]
    for i in a:
        check[i] = 0

print(sum(check))
Problem p03231 (python)

Fixed submission:
def gcd(a,b):
  while b>0:
    a,b=b,a%b
  return a
 
x,y=map(int,input().split())
S=input()
T=input()
GCD=gcd(x,y)
LCM=(x * y) // GCD
 
x_new=x//GCD
y_new=y//GCD
for i in range(0,GCD):
  if S[(x_new)*i]==T[(y_new)*i]:
    result=LCM
  else:
    result=-1
    break
print(result)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
S = input()
T = input()

def gcd(a, b):
    while b!= 0:
        a, b = b, a%b
    return a

if N == M:
    if S == T:
        print('N')
    else:
        print(-1)
    
else:
    if S[0] == T[0]:
        lcm = a*b//(gcd(a, b))
        print(lcm)
        
        
        
        
    else:
        print(-1)
Problem p03244 (python)

Fixed submission:
import collections
N = int(input())
v = list(map(int, input().split()))

if len(set(v)) == 1:
    print(N//2)
else:
    v_gu = v[::2]
    v_ki = v[1::2]
    gu_con = collections.Counter(v_gu)
    ki_con = collections.Counter(v_ki)
    gugu = gu_con.most_common()
    kiki = ki_con.most_common()
    
    if gugu[0][0] != kiki[0][0]:
        print(N-gugu[0][1]-kiki[0][1])
    
    elif len(gugu) == 1 and len(kiki) >=2:
        print(N-gugu[0][1]-kiki[1][1])
        
    elif len(gugu) >= 2 and len(kiki) == 1:
        print(N-gugu[1][1]-kiki[0][1])
    else:
        print(min(N-gugu[0][1]-kiki[1][1],N-gugu[1][1]-kiki[0][1]))

Buggy submission (verdict: Runtime Error):
import collections

n = int(input())
v = [int(i) for i in input().split()]

ans = 0
gu = v[::2]
ki = v[1::2]

gudic = collections.Counter(gu)
kidic = collections.Counter(ki)

gumax = gudic.most_common()
kimax = kidic.most_common()



if gumax[0][0] != kimax[0][0]:
    print((n // 2 - gumax[0][1]) + (n // 2 - kimax[0][1]))
else:
    if len(gumax) == len(kimax) == 1:
        print(n // 2)
    elif len(gumax) == 1 and len(kimax) >= 2:
        print((n // 2 -gumax[0][1]) + (n // 2 - kimax[1][1]))
    
    elif len(gumax) >= 2 and len(kimax) == 1:
        print((n // 2 -gumax[1][1]) + (n // 2 - kimax[0][1]))
    else: 
        one = (n // 2 - gumax[0][1]) + (n // 2 - kimax[1][1])
        ano = (n // 2 - gumax[1][1]) + (n // 2 - kimax[0][[1]])
        print(max(one, ano))

Buggy submission (verdict: Runtime Error):
import collections

n = int(input())
v = [int(i) for i in input().split()]

ans = 0
gu = v[::2]
ki = v[1::2]

gudic = collections.Counter(gu)
kidic = collections.Counter(ki)

gumax = gudic.most_common()
kimax = kidic.most_common()

if gumax[0][0] != kimax[0][0]:
    print((n // 2 - gumax[0][1]) + (n // 2 - kimax[0][1]))
else:
    one = (n // 2 - gumax[0][1]) + (n // 2 - kimax[1][1])
    ano = (n // 2 - gumax[1][1]) + (n // 2 - kimax[0][[1]])
    print(max(one, ano))
Problem p03251 (python)

Fixed submission:
N, M, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
ans = 1

if X >= Y:
    ans = 1
elif X < Y:
    z = list(range(X+1, Y+1))

for i in z:
    if max(x) < i and i <= min(y):
        ans = 0
        
if ans == 0:
     print('No War')
        
else:
    print('War')

Buggy submission (verdict: Runtime Error):
N, M, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))

zx = list(range(max(x)+1,101))
zy = list(range(-100, min(y)+1))
kanou = set(zx) & set(zy)
if len(kanou) == 0:
    print('War')
else:
    for i in kanou:
        if X < i <= Y:
            print('No War')
            break
    else:
        print(War)
Problem p03262 (python)

Fixed submission:
def gcd(a, b):
    while b != 0:
        a, b = b, a%b
    return a

N, X = map(int, input().split())
a = [abs(int(i)-X) for i in input().split()]


if N == 1:
    print(a[0])
else:
    ans = gcd(a[0], a[1])
    for i in range(N):
        ans = gcd(ans, a[i])
    print(ans)

Buggy submission (verdict: Runtime Error):
def gcd(a, b):
    while b != 0:
        a, b = b, a%b
    return a

N, X = map(int, input().split())
a = [abs(int(i)-X) for i in input().split()]
ans = gcd(a[0], a[1])

if N == 1:
    print(abs(X-a[0]))
else:
    for i in range(N):
        ans = gcd(ans, a[i])
    print(ans)
Problem p03273 (python)

Fixed submission:
H, W = map(int, input().split())
a = []
ans = []
for i in range(H):
    a.append(input())
    
    if len(set(a[-1])) == 1 and a[-1][0] == '.':
        del a[-1]

if len(a) == 1:
    kotae = a[0]
    kotae = kotae.replace('.', '')
    print(kotae)
else:
    for x in range(W):
        check = []
        for y in range(len(a)):

            if a[y][x] != '.':
                break
            else:
                check.append(a[y][x])
                
        if len(check) == len(a):
            ans.append(x)
            
    
    if len(ans) >= 1:
        re_ans = []
        for i in a:
            kari = list(i)
            for j in ans:
                kari[j] = '0'
           # print(kari)
            re_ans.append(kari)
        
        for i in re_ans:
            moji = ''.join(i)
            mojji = moji.replace('0', '')
            print(mojji)
    else:
        for i in a:
            print(i)

Buggy submission (verdict: Runtime Error):
H, W = map(int, input().split())
a = []
for i in range(H):
    a.append(input())


for index, i in enumerate(a):
    if i == '.'*W:
        a.remove('.'*W)


aa = list(map(list, zip(*a)))


for index, i in enumerate(aa):
    if i == ['.']*len(aa[0]):
        aa.remove(tamesi)

aaa = list(map(list, zip(*aa)))

for i in aaa:
    print(''.join(i))
Problem p03274 (python)

Fixed submission:
N, K = map(int, input().split())
x = list(map(int, input().split()))
ans = 3*10**8

for i in range(N-K+1):
    ans1 = abs(x[i])+abs(x[i]-x[i+K-1])
    ans2 = abs(x[i+K-1])+abs(x[i]-x[i+K-1])
    ans = min(ans, ans1, ans2)
print(ans)

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
x = list(map(int, input().split()))
ans = 3*10**8

for i in range(N-K+1):
    ans1 = abs(x[i])+abs(x[i]-x[i+K-1])
    ans2 = abs(x[i+N-K])+abs(x[i]-x[i+K-1])
    ans = min(ans, ans1, ans2)
print(ans)

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
x = list(map(int, input().split()))
ans = 10**9

for i in range(N-K+1):
    ans1 = abs(x[i])+abs(x[i]-x[i+N-K])
    ans2 = abs(x[i+N-K])+abs(x[i]-x[i+N-K])
    ans = min(ans, ans1, ans2)
print(ans)

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
x = list(map(int, input().split()))
ans = 3*10**8

for i in range(N-K+1):
    ans1 = abs(x[i])+abs(x[i]-x[i+N-K])
    ans2 = abs(x[i+N-K])+abs(x[i]-x[i+N-K])
    ans = min(ans, ans1, ans2)
print(ans)
Problem p03281 (python)

Fixed submission:
N = int(input())
if N <=104:
    print(0)
    
elif N <= 106:
    print(1)

else:
    if N%2 != 0:
        num = list(range(105, N+1))
        kotae = list(range(1, N+2, 2))
    else:
        num = list(range(105, N))
        kotae = list(range(1, N, 2))
        
    num = num[::2]
    ans = [0] * len(num)
    
    for index, i in enumerate(num):
        for t in kotae:
            if i%t ==0:
                ans[index] += 1
    print(len([1 for x in ans if x>=8]))

Buggy submission (verdict: Runtime Error):
N = int(input())
if N <=104:
    print(0)
    
elif N <= 106:
    print(1)

else:
    if N%2 != 0:
        num = list(range(105, N+1))
        kotae = list(range(1, N+2, 2))
    else:
        num = list(range(105, N))
        kotae = list(range(1, N, 2))
        
    num = num[::2]
    ans = [0] * len(num)
    
    for index, i in enumerate(num):
        for t in kotae:
            if i%t ==0:
                ans[index] += 1

print(len([1 for x in ans if x>=8]))
Problem p03309 (python)

Fixed submission:
N = int(input())
A = [int(i) for i in input().split()]
A = [A[_] - (_ + 1) for _ in range(N)]
AA = sorted(A)
ans = 0
ans1 = 0
center = N // 2
num = AA[center]

if N % 2 != 0:
    for i in range(N):
        ans += abs(AA[i] - num)
    print(ans)
else:
    center = len(AA) // 2
    for i in range(N):
        ans += abs(AA[i]- num)
        ans1 += abs(AA[i]-(AA[center-1]))
    print(min(ans, ans1))

Buggy submission (verdict: Runtime Error):
N = int(input())
A = [int(i) for i in input().split()]
A = [A[_] - (_ + 1) for _ in range(N)]
AA = sorted(A)
ans = 0
ans1 = 0
if N % 2 != 0:
    center = N // 2
    num = AA[center]
    for i in range(N):
        ans += abs(AA[i]-num)
    print(ans)
else:
    center = len(AA) // 2
    for i in range(N):
        ans += abs(AA[i]- num)
        ans1 += abs(AA[i]-(num + 1))
    print(min(ans, ans1))

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [int(i) for i in input().split()]
for i in range(n):
  a[i] -= (i+1)
ave = sum(a) // n
foi i in range(n):
  a[i] = abs(a[i] - ave)
print(sum(a))
Problem p03325 (python)

Fixed submission:
N = int(input())
A = [int(i) for i in input().split()]
ans = 0
check = [0]*30
for i in range(1, 31):
    check[i-1] = 2**i

for i in A:
    if i % 2 == 0:
        j = 0
        while check[j] <= i:
            if i % check[j] == 0:
                add = check[j]
            else:
                break
                
            j += 1
        ans += j
        
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = [int(i) for i in input().split()]
ans = 0
check = [0]*29
for i in range(1, 30):
    check[i-1] = 2**i

for i in A:
    if i % 2 == 0:
        j = 0
        while check[j] <= i:
            if i % check[j] == 0:
                add = check[j]
            else:
                break
                
            j += 1
        ans += j
        
print(ans)
Problem p03352 (python)

Fixed submission:
x = int(input())
out = 1
for i in range(2,33):
    for j in range(2,10):
        num = i**j
        if x >= num:
            out = max(out, num)
print(out)

Buggy submission (verdict: Runtime Error):
X = int(input())
ans = [1]


if X == 1 or X == 2:
    print(1)
else:
	for i in range(2, X + 1):
    	num = i
    	count = 1
    	while num ** i <= X:
            count += 1
            ans.append(num ** i)
            
    print(max(ans))

Buggy submission (verdict: Runtime Error):
X = int(input())
ans = [1]


if X == 1 or X == 2:
    print(1)
else:
    for i in range(2, X + 1):
        num = i
        count = 1
        while num ** i <= X:
            count += 1
            ans.append(num ** i)
	print(max(ans))

Buggy submission (verdict: Runtime Error):
X = int(input())
ans = [1]


if X == 1 or X == 2:
    print(1)
else:
    for i in range(2, X + 1):
        num = i
        count = 1
        while num ** i <= X:
            count += 1
            ans.append(num ** i)
	print(max(ans))

Buggy submission (verdict: Runtime Error):
X = int(input())
ans = set(1)


if X == 1 or X == 2:
    print(1)
else:
    for i in range(2, X + 1):
        num = i
        count = 1
        while num ** i <= X:
            count += 1
            ans.add(num ** i)
print(max(ans))

Buggy submission (verdict: Runtime Error):
n = int(input())
ans = 1000

if n == 1:
    print(n)
else:
    for b in range(2, 33):
        for p in range(2, 11):
            if n-b**p > 0:
                result = min(ans, b**p)

print(result)
Problem p03353 (python)

Fixed submission:
s = input()
K = int(input())
one = list(set(s))
check = 2
if len(s) >= 2:
    while check <= len(s) and check <= 5:
        for i in range(len(s) - check + 1):
            one.append(s[i:i+check])
        check += 1
    one = sorted(set(one))
    print(one[K-1])
    
     
else:
    one = sorted(one)
    print(one[K-1])

Buggy submission (verdict: Runtime Error):
s = input()
K = int(input())
N = len(s)
ans = []

for i in range(1, min(N, 6)):
    for j in range(N - i + 1):
        ans.append(s[j:j+i])

ans = list(set(ans))
ans.sort()
print(ans[K-1])

Buggy submission (verdict: Runtime Error):
s = input()
K = int(input())
ans = []
for i in set(s):
    ans.append(i)

if K == 1:
    print(sorted(ans)[0])
else:
    for i in range(2, 6):
        for j in range(len(s) - i + 1):
            ans.append(s[j:j+i])
    ans = set(ans)
    ans.sort()
    print(ans[K - 1])
Problem p03379 (python)

Fixed submission:
import bisect

N = int(input())
X = [int(_) for _ in input().split()]

X2 = sorted(X)
r = X2[N // 2 ]
l = X2[N // 2 -1]

for i in range(N):
    if bisect.bisect_left(X2, X[i]) < N // 2:
        print(r)
    else:
        print(l)

Buggy submission (verdict: Runtime Error):
import bisect

N = int(input())
X = [int(_) for _ in input().split()]

X2 = sorted(X)
r = X2[N // 2 ]
l = X2[N // 2 -1]

for i in range(N):
    ind = bitsect.bitsect_left(X2, X[i])
    if idx < N // 2:
        print(r)
    else:
        print(l)
Problem p03386 (python)

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

if b-a+1 <= 2*k:
    for num in range(a, b+1):
        print(num)
else:
    for num in range(a, a+k):
        print(num)
    for num in range(b-k+1,b+1):
        print(num)

Buggy submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
ab = [int(i) for i in range(A, B + 1)]
ba = sorted(ab, reverse=True)
ans = []

for i in range(K):
    ans.append(ab[i])
    ans.append(ba[i])

ans = sorted(set(ans))
for i in ans:
    print(i)

Buggy submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
AB = list(range(A, B+1))
 
for i in sorted(set(AB[:K]) | set(AB[-K:])):
    print(i)

Buggy submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
AB = list(range(A, B+1))
ans = set(AB[:K]) | set(AB[-K:])
 
for i in sorted(ans):
    print(i)

Buggy submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
AB = list(range(A, B+1))
ans = sorted(set(AB[:K]) | set(AB[-K:]))
 
for i in ans:
    print(i)

Buggy submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
AB = list(range(A, B+1))
ans = sorted(set(AB[K:]) | set(AB[:-K]))
 
for i in ans:
    print(i)

Buggy submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
AB = list(range(A, B+1))
ans = []
if len(AB[:K]) >= 1 and len(AB[-K:]) >= 1 :
    ans = sorted(set(AB[:K]+AB[-K:]))

elif len(AB[:K]) >= 1:
    ans = sorted(AB[:K])
elif len(AB[-K]) >= 1:
    ans = sorted(AB[:-K])
    
if len(ans)>=1:
    for i in ans:
        print(i)

Buggy submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
AB = list(range(A, B+1))
ans = sorted(set(AB[:K]+AB[-K:]))
 
if len(ans) >= 1:
    for i in ans:
        print(i)

Buggy submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
AB = list(range(A, B+1))


ans = set(AB[:K]+AB[-K:])

for i in sorted(ans):
    print(i)

Buggy submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
AB = list(range(A, B+1))
ans = sorted(set(AB[:K]+AB[-K:]))

for i in ans:
    print(i)

Buggy submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
AB = list(range(A, B+1))
ans = sorted(set(AB[:K]+AB[-K:]))

for i in ans:
    print(i)

Buggy submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
AB = list(range(A, B+1))
for i in AB[:K]:
    print(i)
for i in AB[-K:]:
    print(i)
Problem p03387 (python)

Fixed submission:
A, B, C = list(map(int, input().split()))
ABC = [A, B, C]
ABC.sort()
A = ABC[0]
B = ABC[1]
C = ABC[2]
ans = 0

if (C-A) >= 2:
    ans += (C-A)//2
    A += 2*((C-A)//2)
if (C-B) >= 2:
    ans += (C-B)//2
    B += 2*((C-B)//2)
 
if A == B == C:
    print(ans)
elif A ==B:
    print(ans+1)
else:
    print(ans+2)

Buggy submission (verdict: Runtime Error):
A, B, C = list(map(int, input().split()))
ABC = [A, B, C].sort()
A = ABC[0]
B = ABC[1]
C = ABC[2]

ans = 0

A = (C-A)//2
B =(C-B)//2

ans += (C-A)//2+(C-B)//2

if A == B == C:
    print(ans)
elif A ==C:
    print(ans+1)
else:
    print(ans+2)
Problem p03399 (python)

Fixed submission:
A = [int(input()) for i in range(4)]
print(min(A[0], A[1])+min(A[2], A[3]))

Buggy submission (verdict: Runtime Error):
A, B, C, D = map(int, input().split())
num = 0
if A <= B:
    if C <= D:
        print(A+C)
    else:
        print(A+D)
else:
    if C<= D:
        print(B+C)
    else:
        print(B+D)

Buggy submission (verdict: Runtime Error):
A, B, C, D = map(int, input().split())
num = 0
if A <= B:
    if C <= D:
        print(B+D)
    else:
        print(B+C)
else:
    if C<= D:
        print(A+D)
    else:
        print(A+C)
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)]
ans = 0
for word in set(s):
    ans = max(ans, s.count(word)-t.count(word))

print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
s = [int(input()) for i in  range(N)]
M = int(input())
t = [int(input()) for i in  range(M)]
ans = 0
for word in set(s):
    ans = max(ans, s.count(word)-t.count(word))
print(ans)
Problem p03409 (python)

Fixed submission:
N = int(input())

R = [list(map(int, input().split())) for i in range(N)]
B = [list(map(int, input().split())) for i in range(N)]
R.sort(key = lambda x:x[1], reverse = True)
B.sort()
ans = 0
check = []


for bx, by in B:
    for i in range(N):
        if bx > R[i][0] and by > R[i][1] and i not in check :
            ans += 1
            check.append(i)
            break
            #print('B', bx, by, 'R',R[i][0], R[i][1] )
print(ans)

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

R = [list(map(int, input().split())) for i in range(N)]
B = [list(map(int, input().split())) for i in range(N)]
R.sort(key = lambda x:x[1], reverse = True)
B.sort()
ans = 0
check = []


for bx, by in B:
    for i in range(N):
        if bx > R[i][0] and by > R[i][1] and i not in check :
            ans += 1
            check.append(i)
            break
            #print('B', bx, by, 'R',R[i][0], R[i][1] )
print(ans)
Problem p03424 (python)

Fixed submission:
N = int(input())
S = map(str, input().split())
if 'Y' in S:
    print('Four')
else:
    print('Three')

Buggy submission (verdict: Runtime Error):
N = int(input())
S = set(map(int, input().split()))
if len(S) == 3:
    print('Three')
else:
    print('Four')