Harryxun/GPT-100-sft-dataset huggingface dataset:
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 = int(input().split())
if a+b==15:
  print('+')
elif a*b == 15:
  print('*')
else:
  print('x')
Problem p03323 (python)

Fixed submission:
a,b = map(int,input().split())
if a >= 9 or b >= 9:
	print(':(')
else:
	print('Yay!')

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
if a >= 9 or b >= 9:
	print(':(')
else:
	print('Yay!')
Problem p03338 (python)

Fixed submission:
import collections
n = int(input())
s = input()
ans = []
if n != 2:
    for i in range(1,n-1):
        counter = 0
        seg = s[0:i]
        another = s[i:n]
        d = collections.Counter(seg)
        for k in d:
            if k in another:
                counter += 1
        ans.append(counter)
    print(max(ans))
else:
    if s[0] == s[1]:
        print('1')
    else:
        print('0')

Buggy submission (verdict: Runtime Error):
import collections
n = int(input())
s = input()
ans = []
for i in range(1,n-1):
    counter = 0
    seg = s[0:i]
    another = s[i:n]
    d = collections.Counter(seg)
    for k in d:
        if k in another:
            counter += 1
    ans.append(counter)
print(max(ans))
Problem p03352 (python)

Fixed submission:
x = int(input())
table = [1]
for i in range(2,1000):
	b = 2
	while i**b <= 1000:
		table.append(i**b)
		b += 1
table.sort()
k = 0
while k <= len(table)-1 and table[k] <= x:
	k += 1
print(table[k-1])

Buggy submission (verdict: Runtime Error):
x = int(input())
table = [1]
for i in range(2,1000):
	b = 2
	while i**b <= 1000:
		table.append(i**b)
		b += 1
table.sort()
k = 0
while table[k] <= x:
	k += 1
print(table[k-1])
Problem p03463 (python)

Fixed submission:
n,a,b = map(int,input().split())
if n%2 == 0:
	if (b-a)%2 == 1:
		print('Borys')
	else:
		print('Alice')
else:
	if (b-a)%2 == 1:
		print('Borys')
	else:
		print('Alice')

Buggy submission (verdict: Runtime Error):
n,a,b = map(int,input().split())
if n%2 == 0
	if a == 1:
		if b == n or b == 2:
			print('Borys')
		else:
			print('Alice')
	if b == n
		print('Alice')
else:
	if a == 1:
		if b == n-1:
			print('Borys')
		else:
			print('Alice')
	elif b == n:
		if a == n-1:
			print('Alice')
		else:
			print('Borys')
	else:
		if (b-a)%2 == 1:
			print('Borys')
		else:
			print('Alice')
Problem p03469 (python)

Fixed submission:
s = input()
print(s.replace('2017','2018'))

Buggy submission (verdict: Runtime Error):
n,h = map(int,input().split())
a = []
b = []
for i in range(n):
	c,d = map(int,input().split())
	a.append(c)
	b.append(d)

total = 0
b.sort()
b.reverse()
counter = 0
am = max(a)
for i in b:
	if i >= am:
		total += i
		counter += 1
	else:
		break

if (h-total)%am == 0:
	print(counter+(h-total)//am)
else:
	print(counter+(h-total)//am+1)
Problem p03544 (python)

Fixed submission:
n = int(input())
l = []
l.append(2)
l.append(1)
if n == 1:
	print(1)
else:
	for i in range(2,n+1):
		li = l[i-2] + l[i-1]
		l.append(li)
	print(li)

Buggy submission (verdict: Runtime Error):
n = int(input())
l = []
l.append(2)
l.append(1)
for i in range(2,n+1):
	li = l[i-2] + l[i-1]
	l.append(li)
print(li)
Problem p03550 (python)

Fixed submission:
def max(a,b):
	if a>=b:
		return a
	else:
		return b

n,z,w = map(int,input().split())
a = list(map(int,input().split()))
print(max(abs(a[n-1]-w),abs(a[n-1]-a[n-2])))

Buggy submission (verdict: Runtime Error):
def max(a,b):
  	if a>=b:
      	return a
    else:
      	return b

n,z,w = map(int,input().split())
a = list(map(int,input().split()))
print(max(abs(a[n-1]-w),abs(a[n-1]-a[n-2]))
Problem p03578 (python)

Fixed submission:
import collections
n = int(input())
d = list(map(int,input().split()))
m = int(input())
t = list(map(int,input().split()))
dcounter = collections.Counter(d)
tcounter = collections.Counter(t)
check = True
for i in tcounter.items():
	if dcounter[i[0]] < i[1]:
		check = False
if check:
	print('YES')
else:
	print('NO')

Buggy submission (verdict: Runtime Error):
n = int(input())
d = list(map(int,input().split()))
m = int(input())
t = list(map(int,input().split()))
for i in range(n):
	for k in range(len(d)):
		if len(t) == 0:
			answer = 1
			break
		elif t[0] == d[k]:
			del d[k]
			del t[0]
			break
if answer == 1:
	print('YES')
else:
	print('NO')
Problem p03591 (python)

Fixed submission:
s = input()
if len(s) <= 3:
	print('No')
else:
	if s[0] == 'Y' and s[1] == 'A' and s[2] == 'K' and s[3] == 'I':
		print('Yes')
	else:
		print('No')

Buggy submission (verdict: Runtime Error):
s = input()
if len(s) <= 3:
	print('No')
else:
	if s[0] == Y and s[1] == A and s[2] == K and s[3] == I:
		print('Yes')
	else:
		print('No')
Problem p03597 (python)

Fixed submission:
N = int(input())
a = int(input())
print (N *N - a)

Buggy submission (verdict: Runtime Error):
N = int(input())
K = int(input())
x = list(map(int,input().split()))
L = 0
for i in range(N):
  if K - x[i] <= x[i]:
    L = L + x[i]
  else:
    L = K -x[i]
print (2 * L)
Problem p03609 (python)

Fixed submission:
l = input().split()
x = int(l[0])
t = int(l[1])
y = x - t
if y > 0:
	print('{0}'.format(y))
else:
	print('0')

Buggy submission (verdict: Runtime Error):
x,t = int(input()),int(input())
y = x - t
print('{0}'.format(y))
Problem p03633 (python)

Fixed submission:
def euclid(a,b):
	if b == 0:
		return a
	else:
		return euclid(b,a % b)
		
n = int(input())
t = []
for i in range(n):
	x = int(input())
	t.append(x)

for i in range(0,n-1):
	t[i+1] = t[i] * t[i+1] // euclid(t[i],t[i+1])

print(int(t[n-1]))

Buggy submission (verdict: Runtime Error):
def euclid(a,b):
	if b == 0:
		return a
	else:
		return euclid(b,a % b)
		
n = int(input())
t = []
for i in range(n):
	x = int(input())
	t.append(x)

for i in range(0,n-1):
	t[i+1] = t[i] * t[i+1] / euclid(t[i],t[i+1])

print(int(t[n-1]))
Problem p03636 (python)

Fixed submission:
s = input()
a = len(s)
print('{0}{1}{2}'.format(s[0],a-2,s[-1]))

Buggy submission (verdict: Runtime Error):
s = input()
a = len(s)
print(s[0] + (a-2) + s[-1])
Problem p03659 (python)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
x = sum(a)
t = sum(a)
difference = []
for i in range(n-1):
	x = x - a[i]
	difference.append(abs(t-2*x))
print(min(difference))

Buggy submission (verdict: Runtime Error):
def abs(n):
	if n >= 0:
		return n
	else:
		return -n
		
n = int(input())
a = list(map(int,input().split()))
x = 0
y = 0
difference = []
total = 0
if n % 2 != 0:
	n += 1

for i in range(n):
	total += a[i]
for i in range(1,n//2 +1):
	for k in range(i):
		x += a[k]
	y = total - x
	b = x - y
	difference.append(abs(b))
difference.sort()
print(difference[0])
Problem p03672 (python)

Fixed submission:
s = input()
n = len(s)
check = True
i = 2
while check:
    if s[0:(n-i)//2] == s[(n-i)//2:(n-i)]:
        check = False
    else:
        i += 2
print(n-i)

Buggy submission (verdict: Runtime Error):
s = str(input())
n = len(s)
s = s.rstrip(s[n-1])
for i in range(n):
	a = len(s)
	if (a % 2) == 0:
		ss = s[0:a//2]
		if s.count(ss) == 2:
			print(a)
			break
		else:
			s = s.rstrip(s[a-1])
	else:
		s = s.rstrip(s[a-1])

Buggy submission (verdict: Runtime Error):
s = str(input())
n = len(s)
s = s.rstrip(s[n-1])
for i in range(n):
	a = len(s)
	if (a % 2) == 0:
		ss = s[0:a//2]
		print(s.count(ss))
		if s.count(ss) == 2:
			print(a)
			break
		else:
			s = s.rstrip(s[a-1])
	else:
		s = s.rstrip(s[a-1])
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,b = map(int,input().split())
if a > b:
	print('GREATER')
elif a < b:
	print('LESS')
else:
	print('EQUAL')
Problem p03760 (python)

Fixed submission:
o = input()
e = input()
ans = []
n = len(o)
i = 0
while i < n:
	ans.append(o[i])
	if i < len(e):
		ans.append(e[i])
	i+=1
for i in range(len(ans)):
	if i != len(ans)-1:
		print(ans[i],end="")
	else:
		print(ans[i])

Buggy submission (verdict: Runtime Error):
o = input()
e = input()
ans = []
n = len(o)
i = 0
while i < n:
	ans.append(o[i])
	ans.append(e[i])
	i+=1
for i in range(len(ans)):
	if i != len(ans)-1:
		print(ans[i],end="")
	else:
		print(ans[i])
Problem p04043 (python)

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

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

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

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

Fixed submission:
n = int(input())
a = [int(input()) for i in range(n)]

# ほとんどは全体のmax?
m1 = max(a)

# max値が多い場合用に2nd max
m2 = sorted(a)[n-2]

for i in range(n):
  if a[i] == m1:
    print(m2)
  else:
    print(m1)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [int(input()) for i in range(n)]

# ほとんどは全体のmax?
m1 = max(a)

# max値が多い場合用に2nd max
a2 = list(set(a))
a2.remove(m1)
m2 = max(a2)

for i in range(n):
  if a[i] == m1:
    print(m2)
  elif a[i] == m2:
    print(max(a[:i]+a[i+1:]))
  else:
    print(m1)
Problem p03455 (python)

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

Buggy submission (verdict: Runtime Error):
a=int(input(''))
b=int(input(''))
if (a*b)%2==0:
  print('Even')
else:
  print('Odd')

Buggy submission (verdict: Runtime Error):
a=int(input(''))
b=int(input(''))
if (a*b)%2=0:
  print('Even')
else:
  print('Odd')

Buggy submission (verdict: Runtime Error):
a=int(input(''))
b=int(input(''))
if (a*b)%2=0:
  print('Even')
elif:
  prp('Odd')
Problem p03455 (python)

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

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split(''))
m=a*b
if m%2==1:
  print('Odd')
else:
  print('Even')

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split(''))
m=a*b
if m%2=1;
  print('Odd')
else:
  print('Even')

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split(''))
m=a*b
if m%2=1:
  print('Odd')
else:
  print('Even')

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split(''))
m=a*b
if m%2=1:
  return 'Odd'
else:
  return 'Even'
Problem p02861 (python)

Fixed submission:
import math
import itertools

def l2(z1, z2):
  return math.sqrt(pow(z1[0] - z2[0], 2) + pow(z1[1] - z2[1], 2))

n = int(input())
l = [list(map(int, input().split(' '))) for _ in range(n)]
seq_list = itertools.permutations(l, n)

dist = 0
for seq in seq_list:
  z_fr = []
  z_to = []
  
  for z in seq:
    z_fr = z_to
    z_to = z
    if len(z_fr)==0:
      continue
    dist += l2(z_fr, z_to)

print(dist/math.factorial(n))

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

def l2(z1, z2):
  return math.sqrt(pow(z1[0] - z2[0], 2) + pow(z1[1] - z2[1], 2))

n = int(input())
l = [list(map(int, input().split(' '))) for _ in range(n)]

dist = 0
z_fr = []
z_to = []
for seq in itertools.permutations(l, n):
  for z in seq:
    z_fr = z_to
    z_to = z
    if len(z_fr):
      continue
    dist += l2(z_fr, z_to)

#print(dist/math.factorial(n))
print('2.2761423749')

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

def l2(z1, z2):
  return math.sqrt(pow(z1[0] - z2[0], 2) + pow(z1[1] - z2[1], 2))

n = int(input())
l = [list(map(int, input().split())) for _ in range(n)]

dist = 0
z_fr = []
z_to = []
for seq in itertools.permutations(l, n):
  for z in seq:
    z_fr = z_to
    z_to = z
    if len(z_fr):
      continue
    dist += l2(z_fr, z_to)

print(dist/math.factorial(n))

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

n = int(input())
l = [list(map(int, input().split())) for _ in range(n)]

def l2(z1, z2):
  return math1.sqrt(pow(z1[0] - z2[0], 2) + pow(z1[1] - z2[1], 2))


dist = 0
z_fr = []
z_to = []
for seq in itertools.permutations(l, n):
  for z in seq:
    z_fr = z_to
    z_to = z
    if len(z_fr):
      continue
    dist += l2(z_fr, z_to)

print(dist/math.factorial(n))

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

n = int(input())
l = [list(map(int, input().split())) for _ in range(n)]

def l2(z1, z2):
  return np.sqrt((z1[0]^2 - z2[0]^2) + (z1[1]^2 - z2[1]^2))


dist = 0
z_fr = []
z_to = []
for seq in itertools.permutations(l, n):
  for z in seq:
    z_fr = z_to
    z_to = z
    if len(z_fr):
      continue
    dist += l2(z_fr, z_to)

print(dist/math.factorial(n))
Problem p03101 (python)

Fixed submission:
H,W = map(int,input().split())
h,w = map(int,input().split())
print((H - h) * (W - w))

Buggy submission (verdict: Runtime Error):
H,W = map(input().spilt())
w,h = map(input().spilt())
print((H - h) * (W - w))
Problem p03126 (python)

Fixed submission:
n,m = map(int, input().split())
if n == 1:
    print(input().split()[0])
else:
    kdict = {i:0 for i in range(1,m+1)}
    for _ in range(n):
        for i in map(int, set(input().split()[1:])):
            kdict[i] += 1
    print(len([i for i in kdict.values() if i == n]))

Buggy submission (verdict: Runtime Error):
n,m = map(int, input().split())
if n == 1:
    print(input().split()[0])
else:
    kdict = {}
    for _ in range(n):
        for i in map(int, set(input().split()[1:])):
            kdict[i] += 1
    print(len([i for i in kdict.values() if i == n]))

Buggy submission (verdict: Runtime Error):
n,m = map(int, input().split())
if n == 1:
    print(input().split()[0])
else:
    for _ in range(n):
        for i in map(int, set(input().split()[1:])):
            kdict[i] += 1
    print(len([i for i in kdict.values() if i == n]))

Buggy submission (verdict: Runtime Error):
n,m = map(int, input().split())
if n == 1:
    print(input().split()[0])
else:
    kdict = {i:0 for i in range(1,m+1)}
    for _ in range(n):
        for i in map(int, set(input().split()[1:])):
            kdict[i] += 1
    print(len([i for i in kdict.values()() if i == n]))
Problem p03145 (python)

Fixed submission:
a = list(map(int, input().split()))
print(a[0]*a[1]//2)

Buggy submission (verdict: Runtime Error):
a = [int(input())]
f = lambda n : n // 2 if n % 2 == 0 else 3 * n + 1
i = 2
while f(a[-1]) not in a:
    a.append(f(a[-1]))
    i += 1
print(i)
Problem p03244 (python)

Fixed submission:
from collections import Counter
n = int(input())
v = list(map(int, input().split()))
gu = v[::2]
ki = v[1::2]
ans = 0
k,g = False,False

if v.count(v[0]) == n:#全部同じ
    ans += n // 2
else:
    kic = Counter(ki)
    guc = Counter(gu)
    k1 = kic.most_common(2)
    g1 = guc.most_common(2)
    if k1[0][0] == g1[0][0]:
        if k1[1][1] < g1[1][1]:
            k = True
        else:
            g = True

    kic = list(kic.values())
    guc = list(guc.values())
    kic.sort(reverse = True)
    guc.sort(reverse = True)
    if len(kic) != 1:
        if g:
            ans += kic[0]
            ans += sum(kic[2::])
        else:
            ans += sum(kic[1::]) 
    if len(guc) != 1:
        if k:
            ans += guc[0]
            ans += sum(guc[2::])
        else:
            ans += sum(guc[1::])

print(ans)

Buggy submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
v = list(map(int, input().split()))
gu = v[::2]
ki = v[1::2]
ans = 0
k,g = False,False

###全部同じなら全長の半分,
# 最頻値が同じなら2番目を比べる
if v.count(v[0]) == n
    ans += n // 2
else:
    kic = Counter(ki)
    guc = Counter(gu)
    k1 = kic.most_common(2)
    g1 = guc.most_common(2)
    if k1[0][0] == g1[0][0]:
        if k1[1][1] < g1[1][1]:
            g = True
        else:
            k = True

    kic = list(kic.values())
    guc = list(guc.values())
    kic.sort(reverse = True)
    guc.sort(reverse = True)
    if len(kic) != 1:
        if k:
            ans += kic[0]
            ans += sum(kic[2::])
        else:
            ans += sum(kic[1::]) 
    if len(guc) != 1:
        if g:
            ans += guc[0]
            ans += sum(guc[2::])
        else:
            ans += sum(guc[1::])

print(ans)

Buggy submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
v = list(map(int, input().split()))
gu = [::2]
ki = [1::2]
ans = 0
k,g = False,False

if v.count(v[0]) == n:#全部同じ
    ans += n // 2
else:
    kic = Counter(ki)
    guc = Counter(gu)
    k1 = kic.most_common(2)
    g1 = guc.most_common(2)
    if k1[0][0] == g1[0][0]:
        if k1[1][1] < g1[1][1]:
            k = True
        elif k1[1][1] > g1[1][1]:
            g = True

    kic = list(kic.values())
    guc = list(guc.values())
    kic.sort(reverse = True)
    guc.sort(reverse = True)
    if len(kic) != 1:
        if k:
            ans += kic[0]
            ans += sum(kic[2::])
        else:
            ans += sum(kic[1::]) 
    if len(guc) != 1:
        if g:
            ans += guc[0]
            ans += sum(guc[2::])
        else:
            ans += sum(guc[1::])

print(ans)
Problem p03254 (python)

Fixed submission:
n, x = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
ans = 0
i = 0
while i != n:
    if a[i] > x:
        break
    else:
        x -= a[i]
        ans += 1
        i += 1
if x > 0 and i == n:
    ans -= 1
if ans < 0:
    ans = 0
print(ans)

Buggy submission (verdict: Runtime Error):
n, x = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
ans = 0
i = 0
while x > 0:
    if a[i] > x:
        break
    else:
        x -= a[i]
        ans += 1
        i += 1


print(ans)
Problem p03273 (python)

Fixed submission:
H, W = map(int, input().split())
mas = []
deltags = []
for x in range(H):
    try:
        temp = list(input())
    except:
        pass
    if "#" in temp:
        mas.append(temp)

for x in range(len(mas[0])):
    deltag = False
    for y in range(len(mas)):
        if mas[y][x] == "#":
            break
        if y == len(mas)-1:
            deltag = True
    deltags.append(deltag)

for x in range(len(mas)):
    for y in range(len(mas[x])):
      if deltags[y]:
        mas[x][y] = "A"

try:
    x = 0
    while True:
        while "A" in mas[x]:
            mas[x].remove("A")
        print("".join(mas[x]))
        x += 1
except:
    pass

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

for x in range(W):
    try:
        temp = list(input())
    except:
        pass
    if "#" in temp:
        mas.append(temp)
W = len(mas)
for y in range(H):
    deltag = False
    for x in range(W):
        if mas[x][y] == "#":
            break
        if x == W-1:
            deltag = True
    deltags.append(deltag)

for x in range(W):
    for y in range(H):
      if deltags[y]:
        mas[x][y] = "A"

for x in range(W):
    for y in range(H):
      while "A" in mas[x]:
        mas[x].remove("A")
    print("".join(mas[x]))
Problem p03281 (python)

Fixed submission:
n = int(input())
ans = 0
for i in range(1,n+1,2):
    co = 0
    for f in range(1,i+1):
        if i % f == 0:
            co += 1
    if co == 8:
        ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
print([0, 1][if N > 105])

Buggy submission (verdict: Runtime Error):
N = int(input())
print([0, 1][if N > 105]
Problem p03282 (python)

Fixed submission:
S = list(map(int,input()))
K = int(input())
ans = 1
if K == 1 or S.count(S[0]) == len(S) or S.count(1) == len(S):
    ans = S[0]
else:
  for x in range(K):
    if S[x] != 1:
      ans = S[x]
      break
print(ans)

Buggy submission (verdict: Runtime Error):
S = list(input())
K = int(input())
if K == 1:
    print(S[0])
else:
  for x in range(S):
    if int(x) != 1:
      print(S[x])
      break

Buggy submission (verdict: Runtime Error):
S = list(input())
K = int(input())
if K == 1:
    print(S[0])
else:
    x = 0
    while int(S[x]) == 1:
        x += 1
    print(S[x])
Problem p03289 (python)

Fixed submission:
s = list(input())
if s[0] == "A":
  C = []
  for i in range(2, len(s)-1):
    if s[i] == "C":
      C.append(i)
  if len(C) != 1:
    print("WA")
  else:
    up = False
    for j in range(1,len(s)):
      if j == C[0]:
        continue
      elif not s[j].islower():
        up = True
    if up:
      print("WA")
    else:
      print("AC")
else:
  print("WA")

Buggy submission (verdict: Runtime Error):
s = input()
if s[0] == "A":
  C = []
  for i in range(3, len(s)-2):
    if s[i] == "C":
      C.append(i)
  if len(C) != 1:
    print("WA")
    break 
  else:
    up = False
    for j in range(1,len(s)):
      if j == C[0]:
        pass
      elif s[j].isupper:
        up = True
    if up:
      print("WA")
    else:
      print("AC")
else:
  print("WA")
Problem p03360 (python)

Fixed submission:
x= list(map(int,input().split()))
k = int(input())
x.sort()
a = x[2]
for i in range(k):
    a = a *2
max = x[0] + x[1] + a
 
print(max)

Buggy submission (verdict: Runtime Error):
x= list(map(int,input().split()))
k = int(input())
list.sort()
max = list[0] + lsit[1] + list[2] *2*k
 
print(max)
Problem p03433 (python)

Fixed submission:
n = int(input())
a = int(input())
n = (n % 500)
print(["No", "Yes"][n <= a])

Buggy submission (verdict: Runtime Error):
print(["No","Yes"][((int(input())-int(input())))%500==0]
Problem p03543 (python)

Fixed submission:
s = input()
ans = "No"
for i in range(2):
  if s[i] == s[i+1] == s[i+2]:
    ans = "Yes"
    break
print(ans)

Buggy submission (verdict: Runtime Error):
form collections import Counter
s = input().Counter().most_common(1)[0][1]
if s <= 3:
  print("Yes")
else:
  print("No")
Problem p03563 (python)

Fixed submission:
r = int(input())
g = int(input())
print((g*2)-r)

Buggy submission (verdict: Runtime Error):
r,g = map(int, input().split())
print((g*2)/r)
Problem p03657 (python)

Fixed submission:
a,b=map(int, input().split())
if ((a%3 == 0) or (b%3 == 0)) or ((a + b)%3== 0):
  print("Possible")
else:
  print("Impossible")

Buggy submission (verdict: Runtime Error):
a,b=map(int, input().split())
if ((a%3 == 0) or (b%3 == 0)) or (sum(a,b)%3== 0):
  print("Possible")
else:
  print("Impossible")

Buggy submission (verdict: Runtime Error):
a,b=map(int, input().split())
if (a%3 == 0) or (b%3 == 0) or (sum(a,b)%3== 0):
  print("Possible")
else:
  print("Impossible")

Buggy submission (verdict: Runtime Error):
a,b=map(int, input().split())
if a%3 == 0 or b%3 == 0 or sum(a,b)%3== 0:
  print("Possible")
else:
  print("Impossible")
Problem p03680 (python)

Fixed submission:
n = int(input())
a = [int(input())-1 for x in range(n)]
ans = 0
ok = False
i = 0
for x in range(n):
    if i == 1:
        ok = True
        break
    i = a[i]
    ans += 1

print([-1, ans][ok])

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [int(input())-1 for x in range(n)]
ans = 1
ok = False
i = a.index(1)
for x in range(n):
    if i == 0:
        ok = True
        break
    i = a.index(i)
    ans += 1

print([-1, ans][ok])
Problem p03730 (python)

Fixed submission:
a,b,c=map(int, input().split())
ans= "NO"
for i in range(100):
	if a*i % b == c:
		ans ="YES"
print(ans)

Buggy submission (verdict: Runtime Error):
a,b,c=map(int, input().spilt())
ans= "NO"
for i in range(10):
	if a*i % b == c:
		ans ="YES"
print(ans)
Problem p03597 (python)

Fixed submission:
N=int(input())

print((N*N)-int(input()))

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

N=input()

print(int((N*N))-int(input()))

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

N=input()

print(int((N**2))-int(input()))

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

N=input()
A=input()

print(int((N**2))-int(A))

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

N=input()
A=input()

print((N**2)-A)

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

N=input()
A=input()

print(str((N**2)-A))

Buggy submission (verdict: Runtime Error):
N=input()
A=input()

print((N**2)-A)

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

N=input()
A=input()

print((N**2)-A)