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

Fixed submission:
from collections import Counter

n = int(input())
v = list(map(int, input().split()))

if len(set(v)) != 1:
    a = Counter(v[0::2]).most_common()
    b = Counter(v[1::2]).most_common()
    if a[0][0] != b[0][0]:
        print((len(v[0::2]) - a[0][1]) + (len(v[1::2]) - b[0][1]))
    else:
        if a[0][1] < b[0][1]:
            print((len(v[0::2]) - a[0][1]) + (len(v[1::2]) - b[1][1]))
        elif a[0][1] > b[0][1]:
            print((len(v[0::2]) - a[1][1]) + (len(v[1::2]) - b[0][1]))
        elif a[0][1] == b[0][1]:
            if len(a) != 1 and len(b) != 1:
                if a[1][1] > b[1][1]:
                    print((len(v[0::2]) - a[1][1]) + (len(v[1::2]) - b[0][1]))
                elif a[1][1] < b[1][1]:
                    print((len(v[0::2]) - a[0][1]) + (len(v[1::2]) - b[1][1]))
                elif a[1][1] == b[1][1]:
                    print((len(v[0::2]) - a[0][1]) + (len(v[1::2]) - b[1][1]))
            elif len(a) != 1:
                print((len(v[0::2]) - a[1][1]) + (len(v[1::2]) - b[0][1]))
            elif len(b) != 1:
                print((len(v[0::2]) - a[0][1]) + (len(v[1::2]) - b[1][1]))
else:
    print(len(v[1::2]))

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

n = int(input())
v = list(map(int, input().split()))

if len(set(v)) != 1:
    a = Counter(v[0::2]).most_common()
    b = Counter(v[1::2]).most_common()

    if a[0] != b[0]:
        q = ((len(v[0::2]) - a[0][1]) + (len(v[1::2]) - b[0][1]))
        w = ((len(v[0::2]) - a[0][1]) + (len(v[1::2]) - b[1][1]))
        e = ((len(v[0::2]) - a[1][1]) + (len(v[1::2]) - b[0][1]))
        print(min(q, w, e))
else:
    print(len(v[1::2]))
Problem p03284 (python)

Fixed submission:
a,b=map(int,input().split())
print(int(a%b!=0))

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

Fixed submission:
A = list(map(int, input().split()))
b = [[0, 1], [2, 1], [2, 0]]
l = 0
n = []
for i, j in b:
	l = l + abs(A[j]-A[i])
	n.append(abs(A[j]-A[i]))
l = l - max(n)
print(l)

Buggy submission (verdict: Runtime Error):
A = list(map(int, input().split()))
l = [[0,1],[1,2],[0,3]
ll = []
for i,j in l:
	ll.append(abs(A[i]-A[j]))
print(min(ll))

Buggy submission (verdict: Runtime Error):
A = list(map(int, input().split()))
l = [[0,1],[1,2],[0,3]
ll
for i,j in l:
	ll.append(abs(A[i]-A[j]))
print(min(ll))
Problem p03323 (python)

Fixed submission:
a,b=map(int,input().split())
if a<9 and b<9:
  print("Yay!")
else:
  print(":(")

Buggy submission (verdict: Runtime Error):
D, N = map(int, input().split())
l = []
for i in range(1, 100):
	if 100/i == D:
		l.append(i)
print(l[N-1])
Problem p03415 (python)

Fixed submission:
i=input;print(i()[0]+i()[1]+i()[2])

Buggy submission (verdict: Runtime Error):
a=input().split()[0]
b=input().split()[1]
c=input().split()[2]
print(a+b+c)
Problem p03433 (python)

Fixed submission:
n=int(input())
a=int(input())
if n%500 - a < 1:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n=int(input())
a=int(input())
if n%500 - a < 0:
  print("No")
else:
  prnt("Yes")
Problem p04012 (python)

Fixed submission:
from collections import Counter
w=input()
c=Counter(w).values()
s="Yes"
for i in c:
  if i%2==1:
    s="No"
print(s)

Buggy submission (verdict: Runtime Error):
from collections import Counter
w=input()
c=Counter(c).values()
s="Yes"
for i in c:
  if i%2==1:
    s="No"
print(s)
Problem p03238 (python)

Fixed submission:
n = int(input())

if n == 1:
  print("Hello World")
if n == 2:
  a = int(input())
  b = int(input())
  print(a + b)

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

if n == 1:
  print("Hello World")
if n == 2:
  print(a + b)

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

if n == 1:
  print("Hello World")
if n == 2:
  print(a + b)
Problem p02630 (python)

Fixed submission:
N=int(input())
A=[int(x) for x in input().split()]
Q=int(input())
somme=sum(A)

from collections import Counter
D=Counter()

for l in A:
    D[l]+=1
    
for step in range(Q):
    b,c=map(int,input().split())

    if b not in D:
        print(somme)
        continue

    somme=somme+(c-b)*D[b]

    D[c]=D[c]+D[b]
    del D[b]    
    print(somme)

Buggy submission (verdict: Runtime Error):
import numpy as np
N=int(input())
A=np.array(list(map(int,input().split())))
Q=int(input())
somme=sum(A)
L=np.zeros(10**5+1)
for i in range(1,N+1):
    L[i]=sum(A==i)

for step in range(Q):
    b,c=map(int,input().split())
    somme=somme+(c-b)*L[b]
    L[c]=L[c]+L[b]
    print(int(somme))
Problem p02687 (python)

Fixed submission:
S=input()
if 'B' in S:
  print('ARC')
else:
  print('ABC')

Buggy submission (verdict: Runtime Error):
S='ABC'
if S='ABC':
  print('ARC')
else:
  print('ABC')

Buggy submission (verdict: Runtime Error):
S=input('S')
if S='ABC':
  print('ARC')
else:
  print('ABC')
Problem p02705 (python)

Fixed submission:
import math
R=int(input())
print(math.pi*2*R)

Buggy submission (verdict: Runtime Error):
R=int,input()
import math
def circleround(s):
  s=R*math.pi*2
s=R*math.pi*2
print(s)
Problem p02801 (python)

Fixed submission:
print(chr(ord(input())+1))

Buggy submission (verdict: Runtime Error):
print(chr(ord(input())+1)
Problem p02639 (python)

Fixed submission:
def function(ar):
    print(ar.index(0)+1)

if __name__ == '__main__':
    ar = list(map(int, input().rstrip().split()))
    function(ar)

Buggy submission (verdict: Runtime Error):
def function(ar):
  print((ar.index(0))+1)

if __name__==__"main"__:
  ar=list(map(int, input().rstrip().split()))
  function(ar)
Problem p02628 (python)

Fixed submission:
k, n = map(int, input().split())
prices = list(map(int, input().split()))
prices.sort()
total = sum(prices[:n])
print(total)

Buggy submission (verdict: Runtime Error):
k,n = map(int, input().split())
prices = list(int, input().split()).sort()
total = sum(prices[:n])
print(total)

Buggy submission (verdict: Runtime Error):
k = input()
n = input()
price = list(input().split()).sort

total = sum(prices[:n])
print(total)
Problem p03547 (python)

Fixed submission:
i=input().split()
x=ord(i[0])
y=ord(i[1])
 
if x > y:
    print('>')
elif x < y:
    print('<')
else:
    print('=')

Buggy submission (verdict: Runtime Error):
i1=input().split()

if i[0] > i[1]:
    print('>')
elif i[0] < i[1]:
    print('<')
else:
    print('=')
Problem p02675 (python)

Fixed submission:
n = int(input())
# print(n % 10)
if (n % 10) in [2 , 4 , 5 , 7 , 9]:
	print ("hon")
elif (n % 10) in [ 0 , 1 , 6 , 8]:
    print ("pon")
else:
    print("bon")

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

if (n % 10)==2 or 4 or 5 or 7 or 9:
	print ("hon")
elif (n % 10) == 0 or 1 or 6 or 8:
    print (n+"pon")
else
    prnt(n+"bon):
Problem p02747 (python)

Fixed submission:
s = input()

flag = 0

while flag==0 and len(s)!=0 :
    if s.endswith('hi'):
        s = s[0:len(s)-2]
    else:
        flag = 1
#    print(s)
#    print(len(s))

if flag == 1:
    print('No')
else:
    print('Yes')

Buggy submission (verdict: Runtime Error):
na,nb,nm =  map(int, (input().split()))

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

mina = a[0]
minb = b[0]
for i in range(na):
    if a[i] < mina :
        mina = a[i]
for j in range(nb):
    if b[j] < minb :
        minb = b[j]
min = mina + minb

#  m入力
for k in range(nm):
    i,j,disc = map(int, input().split())
    if min > a[i-1]+b[j-1]-disc:
        min = a[i-1]+b[j-1]-disc

print(min)

Buggy submission (verdict: Runtime Error):
na,nb,nm =  map(int, (input().split()))

# m 初期化
# m = [[0] * 3 for i in range(nm)]
d = [[0] * nb for i in range(na)]
#print(d)

a = list(map(int, input().split()))
b = list(map(int, input().split()))
#  print (a,b)

#  m入力
for k in range(nm):
    i,j,disc = map(int, input().split())
    if d[i][j] < disc:
        d[i][j] = disc
#print(d)

best = a[0] + b[0]

for i in range(na):
    for j in range(nb):
        price = a[i] + b[j] - d[i][j]
        if best > price:
            best = price

print(best)

Buggy submission (verdict: Runtime Error):
na,nb,nm =  map(int, (input().split()))

# m 初期化
m = [[0] * 3 for i in range(nm)]
d = [[0] * nb for i in range(na)]
#print(d)

a = list(map(int, input().split()))
b = list(map(int, input().split()))
#  print (a,b)

#  m入力
for k in range(nm):
    i,j,disc = map(int, input().split())
    d[i][j]=disc

best = a[0] + b[0]

for i in range(na):
    for j in range(nb):
        price = a[i] + b[j] - d[i][j]
        if best > price:
            best = price

print(best)
Problem p02755 (python)

Fixed submission:
a,b = map(int, input().split())
flag = 0
for i in range(10*b, 10*b+10):
	if int(i * 0.08) == a:
		if flag == 0:
			ans=i
			flag = 1
if flag == 1:
	print(ans)
else:
	print(-1)

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
flag = 0
for i in range(10*b, 11*b):
	if int(i * 0.08) == a:
		if flag==0:
			ans　=　i
			flag = 1
if flag == 1:
	print(ans)
else:
	print(-1)

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
flag = 0
for i in range(10*b, 11*b):
	if int(i * 0.08) == a:
		if flag==0:
			ans=i
			flag = 1
if flag == 1:
	print(ans)
else:
	print(”-1”)

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
flag=0
for i in range(10*b+1):
	if int(i * 0.08) == a and int(i * 0.1) == b:
		if flag==0:
			ans=i
            flag=1
if flag == 1:
	print(ans)
else:
	print(-1)
Problem p02784 (python)

Fixed submission:
h, n = map(int, input().split())
a = list(map(int, input().split()))

sum = 0
for i in range(n):
	sum = sum + a[i]
if sum >= h :
	print("Yes")
else:
	print("No")

Buggy submission (verdict: Runtime Error):
n, h = map(int, input().split())
a = list(map(int, input().split()))

sum = 0
for i in range(n):
	sum = sum + a[i]
if sum >= h :
	print("Yes")
else:
	print("No")

Buggy submission (verdict: Runtime Error):
n, h = map(int, input().split())
a = list(map(int, input().split()))

sum = 0
for i in range(n):
	sum = sum + a[i]
if sum >= h :
	print("Yes")
else:
	print("No")
Problem p02802 (python)

Fixed submission:
n,m = map(int, input().split())
 
arS = [False] * (n+1)
arP = [False] * (n+1)
 
score = 0
penalty = 0

for i in range(m):
	id, res = input().split()
	id = int(id)
	if (res == "AC") and (arS[id]==False):
		arS[id] = True
		score = score+1
		penalty = penalty + arP[id]
	if (res == "WA"): 
		arP[id] = arP[id] + 1
        
print(score, penalty)

Buggy submission (verdict: Runtime Error):
n,m = map(int, input().split())
 
arS = [False] * (n+1)
arP = [False] * (n+1)
 
score = 0
penalty = 0

for i in range(m):
	id, res = input().split()
	id = int(id)
	if (res == "AC") and (arS[id]==False):
		arS[id] = True
		score = score+1
        penalty = penalty * arP[id]
	if (res == "WA"): 
		arP[id] = arP[id] + 1
        
print(score, penalty)

Buggy submission (verdict: Runtime Error):
n,m = map(int, input().split())
 
arS = [False] * (n+1)
 
score = 0
penalty = 0
for i in range(m):
	id, res = input().split()
	id = int(id)
#	print(type(id),type(res))
	if (res == "AC") and (arS[id]==False):
		arS[id] = True
		score = score+1
	if (res == "WA")  # and (arS[id]==False): 
		penalty = penalty + 1
        
print(score, penalty)

Buggy submission (verdict: Runtime Error):
n,m = map(int, input().split())

arS = [False] * n

score = 0
penalty = 0
for i in range(m):
	id, res = input().split()
	id = int(id)
#	print(type(id),type(res))
	if (res == "AC") and (arS[id]==False):
		arS[id] = True
		score = score+1
	if (res == "WA") and (arS[id]==False): 
		penalty = penalty + 1
        
print(score, penalty)
Problem p02812 (python)

Fixed submission:
n=int(input())
s=input()
 
count = 0
for i in range(n-3+1):
#	print(s[i],s[i+1],s[i+2])
	if s[i]=="A" and s[i+1]=="B" and s[i+2]=="C":
		count = count + 1
print(count)

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

count = 0
for i in range(n-3)
	if s[i]=="A" and s[i+1]=="B" and s[i+2]=="C":
		count = count + 1
print(count)
Problem p02813 (python)

Fixed submission:
import math

n = int(input())
p = list(map(int, input().split()))

q = list(map(int, input().split()))

ord1 = 0
flag = [0] * (n+1)
for i in range(n-1):
	ln = 0
#	print(type(p[i]), p[i])
	for c in range(1,p[i]):
		if flag[c] == 0:
			ln = ln + 1 
	flag[p[i]] = 1
	ord1 = ord1 + ln * math.factorial(n-1-i)
#	print(ln,  math.factorial(ln))
ord1 = ord1+1 
#print(ord1)
  
ord2 = 0
flag = [0] * (n+1)
for i in range(n-1):
	ln = 0
#	print(type(q[i]), q[i])
	for c in range(1,q[i]):
		if flag[c] == 0:
			ln = ln + 1 
	flag[q[i]] = 1
	ord2 = ord2 + ln * math.factorial(n-1-i)
#	print(ln,  math.factorial(ln))
ord2 = ord2+1 
#print(ord2)

print(abs(ord2 - ord1))

Buggy submission (verdict: Runtime Error):
n = int(input())
s1 = list(map(int,input().split()))
#print(type(s1))
val1 = 0
for i in range(n):
	val1 = val1 + s1[i] * math.factorial(10-i-1) // math.factorial(10-n)
#	print(math.factorial(10-i-1) // math.factorial(10-n))
print(val1)

Buggy submission (verdict: Runtime Error):
n = input()
s1 = map(int,input().split())
print(type(sl))
Problem p02848 (python)

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

for i in range(len(s)): 
	if ord(s[i]) +n >= 65 + 26 :
		print(chr(ord(s[i])+n-26),end="")
	else:
		print(chr(ord(s[i])+n),end="")

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

for i in range(len(s)):
	print(chr(ord( (s[i]+n)% 26)  )   , end="")
Problem p02917 (python)

Fixed submission:
n = int(input())
b = list(map(int, input().split()))

#print(n)
#print(b)

score = b[0]+b[n-2]
#print(b[0],b[n-2])

for i in range(0,n-2):
	score = score + min(b[i],b[i+1])
#	print(min(b[i],b[i+1]))
print(score)

Buggy submission (verdict: Runtime Error):
n = int(input())
b = list(map(int, input().split()))

#print(n)
#print(b)

score = b[0]+b[n-2]
#print(b[0],b[n-2])

for i in range(0,n-1):
	score = score + min(b[i],b[i+1])
#	print(min(b[i],b[i+1]))
print(score)
Problem p02921 (python)

Fixed submission:
S=input()
T=input()

score=0

if S[0] == T[0]:
  	score=score+1
if S[1] == T[1]:
  	score=score+1
if S[2] == T[2]:
	score=score+1
 
print(score)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())

n = 1
c = 0

while n < B:
	n = n + A -1
	c = c+1
    
print(c)

Buggy submission (verdict: Runtime Error):
S = input()
T = intpu()

score = 0
if S[0]==T[0]:
	score = score +1
  
if S[1]==T[1]:
    score=score+1
    
if S[2]==T[2]:
	score=score*1

print(score)
Problem p02922 (python)

Fixed submission:
A, B = map(int, input().split())

n = 1
c = 0

while n < B:
	n = n + A -1
#	print(n)
	c = c+1

print(c)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())

n = 1
c = 0

while n < B:
	n = n + A -1
    print(n)
	c = c+1

print(c)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())

n = 1
c = 0

if B==1 :
  print("0")
else :
	while n < B:
		n = n + A -1
		c = c+1
    print(c)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())

n = 1
c = 0

while n < B:
	n = n + A -1
	c = c+1
 
if B != 1:
	print(c)
else
	print("0")
Problem p02983 (python)

Fixed submission:
l, r = map(int, input().split())
#print(l,r)

best = 2019
for i in range(l, min(r,l+2019)):
	for j in range(l+1,min(r+1,l+2019+1)):
		if i*j % 2019 < best:
			best = i*j % 2019

print(best)

Buggy submission (verdict: Runtime Error):
l, r = map(int, input().split())
%print(l,r)

best = 2019
for i in range(l, r):
	for j in range(l+1,r+1):
		if i*j % 2019 < best:
			best = i*j % 2019

print(best)
Problem p03324 (python)

Fixed submission:
d, n = map(int, input().split())
 
if d==0:
	if n<100:
		print(n)
	else:
		print(101)    
elif d==1:
	if n<100:
		print(n*100)
	else:
		print(10100)
elif d==2:
	if n<100:
		print(n*10000)
	else:
		print(n*10000+10000)

Buggy submission (verdict: Runtime Error):
d, n = map(int, input().split())
 
if d==0:
	print(n)
elif d==1:
	if n<100:
		print(n*100)
    else:
        print(10100)
elif d==2:
  	if n<100:
		print(n*10000)
    else:
        print(n*10000+10000)

Buggy submission (verdict: Runtime Error):
d, n = map(i, input().split())
 
if d==0:
	print(n)
elif d==1:
	print(n*100)
elif d==2:
	print(n*10000)

Buggy submission (verdict: Runtime Error):
d, n = map(i, input().split())
 
if d==0:
	print(n)
if d==1:
	print(n*100)
if d==2:
	print(n*10000)

Buggy submission (verdict: Runtime Error):
d, n = map(i, input().split())
 
if d==0:
  print(n)
if d==1:
  print(n*100)
if d==2:
  print(n*10000)

Buggy submission (verdict: Runtime Error):
d, n = map(i, input().split())

if d==0:
  print(d)
if d==1:
  print(d*100)
if d==2:
  print(d*10000)
Problem p03325 (python)

Fixed submission:
n=int(input())
#print(n)
low = list(map(int,input().split()))
#print("INPUT = ")
#print(low)
count = 0
for i in range(n):
	tmp = int(low[i])
	while tmp % 2 == 0 and tmp !=0:
		tmp = tmp// 2
		count = count + 1
#		print("COUNT=", count, "TMP=",tmp)
#print("ANS = ")
print(count)

Buggy submission (verdict: Runtime Error):
n = input()
low = list(map(int, input().split()))
for i in range(n)
	count = 0
	tmp = low[i]
	while tmp % 2 == 0:
		tmp = tmp % 2 
		count = count + 1
        
print(count)
Problem p02628 (python)

Fixed submission:
N, K = map(int, input().split())
fruits = map(int, input().split())

print(sum(sorted(fruits)[:K]))

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

return sorted(fruit)[:K]
Problem p02801 (python)

Fixed submission:
C = input()

a = 'a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,w,v,x,y,z'

arr = a.split(",")

idx = 0
count = 0

for i in arr:
  if i == C:
    idx = count
  count += 1
  
print(arr[idx+1])

Buggy submission (verdict: Runtime Error):
N, M = input().split(" ")

idxw = {}
idxa = {}

for i in range(int(M)):
  p, s = input().split(" ")
  if not ('{}{}'.format(p,s) in idxa):
    if s == 'AC':
      idxa['{}{}'.format(p, s)] = True
  if not ('{}{}'.format(p,s) in idxw):
    if not ('{}{}'.format(p,'AC') in idxa):
      if s == 'WA':
        idxw['{}{}'.format(p, s)] = True
#print(idxw)
#print(idxa)

print('{} {}'.format(len(idxa), len(idxw)))
Problem p03136 (python)

Fixed submission:
import sys

n = input()
lengths = list(map(int,input().split(" ")))

lengths = sorted(lengths)
max = lengths.pop(-1)
if max < sum(lengths) :
    print("Yes")
else :
    print("No")

Buggy submission (verdict: Runtime Error):
import sys

n = input()
lengths = list(map(int,input().split(" ")))

lengths = sorted(lengths)
max = length.pop(-1)
if max < sum(length) :
    print("Yes")
else :
    print("No")
Problem p03001 (python)

Fixed submission:
W,H,x,y = map(int, input().split())
if(2*x == W and 2*y == H):
	print(W*H/2, 1)
else:
	print(W*H/2, 0)

Buggy submission (verdict: Runtime Error):
W,H,x,y = map(int, input().split())
if(x == 0 or x == W or y == 0 or Y == H):
	print(0, 0)
	exit(0)

if (W*y < H*x):
	if(W == y * 2):
		print(W*y, 1)
	else:
		print(W*y, 0)
elif (W*y > H*x):
	if(H == x * 2):
		print(H*x, 1)
	else:
		print(H*x, 0)
else:
	print(W*y, 1)
Problem p02811 (python)

Fixed submission:
K, X = map(int, input().split())
 
print('Yes' if X/500<=K else'No')

Buggy submission (verdict: Runtime Error):
K, X = map(int, input().split())

print('Yes' if X/500<=k else'NO')
Problem p02812 (python)

Fixed submission:
N = int(input())
S = input()
print(S.count('ABC'))

Buggy submission (verdict: Runtime Error):
N = int(input())
S = input()
print(S.count())
Problem p03110 (python)

Fixed submission:
N = int(input())
x = 0
for _ in range(N):
    k, u = input().split()
    x += float(k)*(380000 if u == 'BTC' else 1)
print(x)

Buggy submission (verdict: Runtime Error):
N = int(input())
x = 0
for _ in range(N):
    k, u = tuple(input().split())
    k += float(x)*(380000 if u == 'BTC' else 1)
print(k)

Buggy submission (verdict: Runtime Error):
N = int(input())
x = 0
for _ in range(N):
    k, u = input().split()
    k += float(x)*(380000 if u == 'BTC' else 1)
print(k)
Problem p02628 (python)

Fixed submission:
N,K=map(int,input().split())
P=list(map(int,input().split()))

P.sort()
price=0
for i in range(K):
  price+=P[i]
  
print(price)

Buggy submission (verdict: Runtime Error):
N,K=map(int,input().split())
P=list(map(input().split()))

P.sort()
price=0
for i in range(K):
  price+=P[i]
  
print(price)
Problem p02789 (python)

Fixed submission:
N,M=map(int,input().split())
if N==M:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
N,M=map(int,imput().split())
if N==M:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
N,M=map(int,imput().split())
if N=M:
  print('Yes')
else:
  print('No')
Problem p02830 (python)

Fixed submission:
N=int(input())
S,T=input().split()
result=''
for i in range(N):
  result+=S[i]+T[i]
print(result)

Buggy submission (verdict: Runtime Error):
N=int(input())
S,T=input().split()
result=''
for i in range N:
  result=S[i]+T[i]
print(result)
Problem p02957 (python)

Fixed submission:
A,B=map(int,input().split())
if (A+B)%2 !=0:
  print('IMPOSSIBLE')
else:
  print((A+B)//2)

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split())
if　(A+B)%2 !=0:
  print('IMPOSSIBLE')
else:
  print((A+B)//2)

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split())
if　(A+B)%2 !=0:
  print('IMPOSSIBLE')
else:
  print((A+B)//2)
Problem p02958 (python)

Fixed submission:
N=int(input())
p=list(map(int,input().split()))
false_num=0
for i in range(N):
    if p[i] != i+1:
        
        false_num+=1

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

Buggy submission (verdict: Runtime Error):
N=int(input())
p=list(map(int,input().split()))
false_num=0
for i in range(N-1):
    if p[i]+1==p[i+1]:
        continue
    else:
        false_num+=1

if false_num=0 or 2:
    print('YES')
else:
    print('NO')
Problem p03285 (python)

Fixed submission:
N=int(input())
for i in range(26):
  price=4*i
  for j in range(16):
    price+=7*j
    if price==N:
      print('Yes')
      break
  if price==N:
      break
else:
  print('No')

Buggy submission (verdict: Runtime Error):
N=int(input())
for i in range 26:
  for j in range 14:
    if i+j==N:
      print('Yes')
      break
  else:
    continue
  break
else:
  print('No')

Buggy submission (verdict: Runtime Error):
N=int(input())
for i in range 26:
  price=4*i
  for j in range 16:
    price+=7*j
    if price==N:
      print('Yes')
      break
print('No')

Buggy submission (verdict: Runtime Error):
N=int(inout())
for i in range 26:
  price=4*i
  for j in range 16:
    price+=7*j
    if price==N:
      print('Yes')
      break
print('No')
Problem p02630 (python)

Fixed submission:
import collections
N = int(input())
A = list(map(int, input().split()))
count = collections.defaultdict(int)
currSum = 0
for a in A:
  count[a] += 1
  currSum += a
Q = int(input())
for _ in range(Q):
  B, C = map(int, input().split())
  currSum += (count[B] * (C - B))
  count[C] += count[B]
  count[B] = 0
  print(currSum)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = map(int, input.split())
indices = collections.defaultdict(list)
for i, a in enumerate(A):
  indices[a].append(i)
Q = int(input())
for _ in Q:
  B, C = map(int, input.split())
  for i in indices[B]:
    indices[C].append(i)
    A[i] = C
  print(sum(A))
Problem p02818 (python)

Fixed submission:
A,B,K=map(int,input().split())
 
if A-K>0:
  print(A-K, B)
elif B-(K-A)>0:
  print(0, B-K+A)
else:
  print(0,0)

Buggy submission (verdict: Runtime Error):
A,B,K=map(int,input().Split())

if A-K>0:
  print(A-K, B)
elif B-(K-A)>0:
  print(0, B-K+A)
else:
  print(0,0)

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().Split())
K=int(input())

if A-K>0:
  print(A-K, B)
elif B-(K-A)>0:
  print(0, B-K+A)
else:
  print(0,0)
Problem p03085 (python)

Fixed submission:
b=input()
if b=="A":
  print("T")
elif b=="T":
  print("A")
elif b=="C":
  print("G")
else:
  print("C")

Buggy submission (verdict: Runtime Error):
b=input()
if b=A:
  print("T")
elif b=T:
  print("A")
elif b=C:
  print("G")
else:
  print("C")