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

Fixed submission:
#coding:utf-8
n = int(input())
blue = []
plus = []
for i in range(n):
    s = input()
    if s in blue:
        plus[blue.index(s)] += 1
    else:
        blue.append(s)
        plus.append(1)
m = int(input())
for i in range(m):
    s = input()
    if s in blue:
        plus[blue.index(s)] -= 1
    else:
        blue.append(s)
        plus.append(-1)
print(max(0, max(plus)))

Buggy submission (verdict: Runtime Error):
#coding:utf-8
n = int(input())
blue = []
plus = [0]*n
for i in range(n):
    s = input()
    if s in blue:
        plus[blue.index(s)] += 1
    else:
        blue.append(s)
        plus[blue.index(s)] += 1
m = int(input())
for i in range(m):
    s = input()
    if s in blue:
        plus[blue.index(s)] -= 1
    else:
        blue.append(s)
        plus[blue.index(s)] -= 1
print(max(0, max(plus)))

Buggy submission (verdict: Runtime Error):
#coding:utf-8
n = int(input())
blue = []
plus = [0]*n
for i in range(n):
    s = input()
    if s in blue:
        plus[blue.index(s)] += 1
    else:
        blue.append(s)
m = int(input())
for i in range(m):
    s = input()
    if s in blue:
        plus[blue.index(s)] -= 1
print(plus.max())
Problem p03427 (python)

Fixed submission:
#coding:utf-8
n = int(input())
num = len(str(n))
tmp = pow(10, num)-1
s = 0
for i in range(num+1):
    if i == num:
        s = sum(list(map(int, str(tmp-9*pow(10, num-1)+(int(str(n)[0])-1)*pow(10, num-1)))))
        break
    elif tmp-pow(10, i) <= n:
        s = sum(list(map(int, str(tmp-pow(10, i)))))
        break
if sum(list(map(int, str(n)))) > s:
    print(sum(list(map(int, str(n)))))
else:
    print(s)

Buggy submission (verdict: Runtime Error):
#coding:utf-8
n = int(input())
num = len(str(n))
tmp = pow(10, num)-1
s = 0
for i in range(num+1):
    if i == num:
        s = sum(list(map(int, str(tmp-9*pow(10, num-1)+(int(str(n)[0])-1)*pow(10, num-1)))))
        break
    elif tmp-pow(10, i) <= n:
        s = sum(list(map(int, str(tmp-pow(10, i)))))
        break
if sum(list(map(int, str(n)))) > s:
    print(sum(list(map(int. str(n)))))
else:
    print(s)

Buggy submission (verdict: Runtime Error):
#coding:utf-8
n = int(input())
num = len(str(n))
tmp = pow(10, num)-1
s = 0
for i in range(num+1):
    if i == num:
        s = sum(list(map(int, str(tmp-9*pow(10, num-1)+(int(str(n)[0])-1)*pow(10, num-1)))))
        break
    elif tmp-pow(10, i) <= n:
        s = sum(list(map(int, str(tmp-pow(10, i)))))
        break
if sum(list(map(int. str(n)))) > s:
    print(sum(list(map(int. str(n)))))
else:
    print(s)

Buggy submission (verdict: Runtime Error):
#coding:utf-8
n = int(input())
num = len(str(n))
tmp = pow(10, num)-1
s = 0
for i in range(num+1):
    if i == num:
        s = sum(list(map(int, str(tmp-9*pow(10, num-1)+(int(str(n)[0])-1)*pow(10, num-1)))))
        break
    elif tmp-pow(10, i) <= n:
        s = sum(list(map(int, str(tmp-pow(10, i)))))
        break
if sum(list(map(int. str(n)))) > s:
    print(sum(list(map(int. str(n)))))
else:
    print(s)
Problem p03433 (python)

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

Buggy submission (verdict: Runtime Error):
#coding:utf-8
import numpy as np

white = "."
black = "#"
w, h = list(map(int, input().split()))
map = np.zeros([w, h])
s = []
for i in range(h):
    try:
        while True:
            s.append(input())
    except EOFError:
        pass
for i in range(h):
    for j in range(w):
        if s[j] == white:
            map[j, i] += 1
can = False
for i in range(w):
    sm1 = np.sum(map[0:i+1, 0])
    for j in range(w-i):
        sm2 = 0
        if(j > 0):
            sm2 += np.sum(map[i+1:i+1+j, 1])-1
        if(i+j+1 < w-1):
            sm2 += np.sum(map[i+1+j:w, 2])-1
        if sm1+sm2 == w+h-1:
            can = True
if can == True:
    mx = int(np.sum(map)-(w+h-1))
    print(mx)
else:
    print("-1")

Buggy submission (verdict: Runtime Error):
#coding:utf-8
import numpy as np
c = []
c.append (list(map(int, input().split())))
c.append (list(map(int, input().split())))
c.append (list(map(int, input().split())))
c = np.array(c)
if np.sum(c)/3 == c[0]+c[4]+c[8]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
#coding:utf-8
import numpy as np
c = np.array(list(map(int, input().split())))
if np.sum(c)/3 == c[0]+c[4]+c[8]:
    print("Yes")
else:
    print("No")
Problem p02936 (python)

Fixed submission:
import sys
sys.setrecursionlimit(200000)
from collections import deque

N, Q = map(int, input().split())

connection = [[] for i in range(N)]
for i in range(N-1):
    a,b =  map(int, input().split())
    connection[a-1].append(b)
    connection[b-1].append(a)

operations = [0] * N
for i in range(Q):
    p,q =  map(int, input().split())
    operations[p-1] += q

ans = [0] * N

stack = deque([1])
while len(stack)>0:
    node = stack.pop()
    ans[node-1] += operations[node-1]
    for node_c in connection[node-1]:
        connection[node_c-1].remove(node)
        ans[node_c-1] += ans[node-1]
        stack.append(node_c)

print(' '.join(map(str, ans)))

Buggy submission (verdict: Runtime Error):
from collections import defaultdict, deque
N, Q = map(int, input().split())

connection = defaultdict(list)
for i in range(N-1):
    a,b =  map(int, input().split())
    connection[a].append(b)
    connection[b].append(a)

operations = defaultdict(int)
for i in range(Q):
    p,q =  map(int, input().split())
    operations[p] += q


ans = defaultdict(int)

def func(node,p_node):
    ans[node] += operations[node]
    if p_node != 0:
        connection[node].remove(p_node)
    for c_node in connection[node]:
        ans[c_node] += ans[node]
        func(c_node, node)

func(1, 0)

print(' '.join(list(map(str, ans.values()))))

Buggy submission (verdict: Runtime Error):
from collections import defaultdict, deque, Counter
N, Q = map(int, input().split())

connection = defaultdict(list)
for i in range(N-1):
    a,b =  map(int, input().split())
    connection[a].append(b)
    connection[b].append(a)

operations = Counter()
for i in range(Q):
    p,q =  map(int, input().split())
    operations[p] += q

ans = defaultdict(int)
ans[1] = operations[1]

def func(node,p_node):
    ans[node] = ans[p_node] + operations[node]
    connection[node].remove(p_node)
    for c_node in connection[node]:
        func(c_node, node)

for node in connection[1]:
    func(node, 1)

print(' '.join(list(map(str, ans.values()))))

Buggy submission (verdict: Runtime Error):
from collections import defaultdict, deque, Counter
N, Q = map(int, input().split())

connection = defaultdict(list)
for i in range(N-1):
    a,b =  map(int, input().split())
    connection[a].append(b)

operations = Counter()
for i in range(Q):
    p,q =  map(int, input().split())
    operations[p] += q

children = defaultdict(set)
for i in range(1,N+1):
    children[i].add(i)
    d = deque(connection[i])
    checked = set(connection[i])
    while len(d) > 0:
        x = d.popleft()
        children[i].add(x)
        d += connection[x]

ans = []
for i in range(1, N+1):
    for v in children[i]:
        cnt += operations[v]
        print(cnt)
    ans.append(str(cnt))
print(' '.join(ans))
Problem p03030 (python)

Fixed submission:
from collections import defaultdict
d = defaultdict(list)
n = int(input())
for i in range(n):
    city, point = input().split()
    d[city].append((int(point), i+1))

d2 = sorted(d.items())
for i in range(len(d2)):
    d2[i] = list(d2[i])
    d2[i][1] = sorted((d2[i][1]), reverse = True)
    for j in range(len(d2[i][1])):
        print(d2[i][1][j][1])

Buggy submission (verdict: Runtime Error):
from collections import defaultdict
d = defaultdict(list)
n = int(input())
for i in range(n):
    city, point = input().split()
    d[city].append((int(point), i))

d2 = sorted(d.items())
for i in range(len(d2)):
    sorted(d2[i][1])
    for j in range(len(d2[i])):
        print(d2[i][1][j][1] + 1)
Problem p03416 (python)

Fixed submission:
A,B=map(int,input().split())
count = 0
for i in range(A, B+1):
    count += (str(i) == str(i)[::-1])
print(count)

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
count = 0
for i in range(A, B+1):
    count += (str(i) == str(i)[::-1])
print(count)
Problem p03624 (python)

Fixed submission:
S = input()
S = sorted(S)
i = 0
if S[0] != "a":
    print("a")
    exit(0)
while i<len(S)-1:
    if ord(S[i]) == ord(S[i+1]) or ord(S[i]) == ord(S[i+1])-1:
        i += 1
    else:
        print(chr(ord(S[i])+1))
        exit(0)

if S[-1] == "z":
    print("None")
else:
    print(chr(ord(S[i])+1))

Buggy submission (verdict: Runtime Error):
S = input()
S = sorted(S)
i = 0
if S[0] != "a":
    print("a")
    exit(1)
while i<len(S)-1:
    if ord(S[i]) == ord(S[i+1]) or ord(S[i]) == ord(S[i+1])-1:
        i += 1
    else:
        print(chr(ord(S[i])+1))
        exit(0)

if S[-1] == "z":
    print("None")
else:
    print(chr(ord(S[i])+1))
Problem p02743 (python)

Fixed submission:
from decimal import Decimal

a, b, c = input().split()
a = Decimal(int(a)).sqrt()
b = Decimal(int(b)).sqrt()
c = Decimal(int(c)).sqrt()

d = a + b

if d < c:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
import math

a, b, c = input().split()
a = math.sqrt(int(a))
b = math.sqrt(int(b))
c = math.sqrt(int(c))
d = a + b - c

if d < 0:
    if math.isclose(d, 0.0):
        print('No')
    else:
        print('Yes')
else:
    print('No')
Problem p02727 (python)

Fixed submission:
x,y,a,b,c=map(int,input().split())
p=list(map(int,input().split()))
q=list(map(int,input().split()))
r=list(map(int,input().split()))

p.sort(reverse=True)
q.sort(reverse=True)
r.sort(reverse=True)

p=p[:x]
q=q[:y]

p.extend(q)#白なし
p.sort()
r=r[:x+y]# able add
lenR=len(r)

temp=p[:lenR]# 白なしの小さいものたち
temp.extend(r)#白と前の小さい者たちの合計
temp.sort(reverse=True)
temp=temp[:lenR]#白ありでのMAX

print(sum(p[lenR:])+sum(temp))

Buggy submission (verdict: Runtime Error):
x,y,a,b,c=map(int,input().split())
p=list(map(int,input().split()))
q=list(map(int,input().split()))
r=list(map(int,input().split()))

p.sort()
q.sort()
r.sort()


red=0
for _ in range(x):
	pMax=max(p)
	rMax=max(r)
	if pMax >rMax:
		red+=pMax
		p.pop(p.index(pMax))
	else:
		red+=rMax
		r.pop(r.index(rMax))

white=0
for _ in range(y):
	qMax=max(q)
	rMax=max(r)
	if qMax >rMax:
		red+=qMax
		q.pop(q.index(qMax))
	else:
		red+=rMax
		r.pop(r.index(rMax))

print(white+red)

Buggy submission (verdict: Runtime Error):
x,y,a,b,c=map(int,input().split())
p=list(map(int,input().split())).sort()
q=list(map(int,input().split())).sort()
r=list(map(int,input().split())).sort()


red=0
for _ in range(x):
	pMax=max(p)
	rMax=max(r)
	if pMax >rMax:
		red+=pMax
		p.pop(p.index(pMax))
	else:
		red+=rMax
		r.pop(r.index(rMax))

white=0
for _ in range(y):
	qMax=max(q)
	rMax=max(r)
	if qMax >rMax:
		red+=qMax
		q.pop(q.index(qMax))
	else:
		red+=rMax
		r.pop(r.index(rMax))

print(white+red)

Buggy submission (verdict: Runtime Error):
x,y,a,b,c=map(int,input().split())
p=list(map(int,input().split()))
q=list(map(int,input().split()))
r=list(map(int,input().split()))

#red
red=0
for _ in range(x):
	pMax=max(p)
	rMax=max(r)
	if pMax >rMax:
		red+=pMax
		p.pop(p.index(pMax))
	else:
		red+=rMax
		r.pop(r.index(rMax))

white=0
for _ in range(y):
	qMax=max(q)
	rMax=max(r)
	if qMax >rMax:
		red+=qMax
		q.pop(q.index(qMax))
	else:
		red+=rMax
		r.pop(r.index(rMax))

print(white+red)
Problem p03633 (python)

Fixed submission:
import fractions as math
n=int(input())
T=[]
for  i in range(n):
	T.append(int(input()))

ans=T[0]
for i in range(1,len(T)):
	ans=ans*T[i]//math.gcd(int(ans),T[i])


print(int(ans))

Buggy submission (verdict: Runtime Error):
import math
n=int(input())
T=[]
for  i in range(n):
	T.append(int(input()))

ans=T[0]
for i in range(1,len(T)):
	ans=ans*T[i]//math.gcd(int(ans),T[i])


print(int(ans))

Buggy submission (verdict: Runtime Error):
import math
n=int(input())
T=[]
for  i in range(n):
	T.append(int(input()))

ans=T[0]
for i in range(1,len(T)):
	ans=ans*T[i]/math.gcd(int(ans),T[i])


print(int(ans))
Problem p03665 (python)

Fixed submission:
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result


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

even=0
odd=0
for i in a:
    if i%2 == 0:
        even+=1
    else:
        odd+=1
ans = 0
if p == 0:
    evens = 0
    i = 1
    while(i <= even):
        evens += cmb(even, i)

        i+=1

    ans += 1<<even
    i = 2
    while(i <= odd):
        ans += cmb(odd, i) + cmb(odd, i)*evens
        i+=2

    print(ans)

else:
    evens = 0
    i = 1
    while(i <= even):
        evens += cmb(even, i)

        i+=1

    i = 1
    while(i <= odd):
        ans += cmb(odd, i) + cmb(odd, i)*evens

        i+=2
    print(ans)

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

even=0
odd=0
for i in a:
    if i%2 == 0:
        even+=1
    else:
        odd+=1
ans = 0
if p == 0:
    ans += 1<<even
    i = 2
    while(i <= odd):
        ans += math.comb(odd, i)
        i+=2

    print(ans)

else:
    evens = 0
    i = 1
    while(i <= even):
        evens += math.comb(even, i)

        i+=1

    i = 1
    while(i <= odd):
        ans += math.comb(odd, i) + math.comb(odd, i)*evens

        i+=2
    print(ans)
Problem p02630 (python)

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
Q = int(input())
BC = [list(map(int,input().split())) for i in range(Q)]
B, C = [list(i) for i in zip(*BC)]
#print(B,C,BC)

dic = {}
for a in A:
  dic[a] = dic.get(a,0) + 1
#print(dic)

ans = sum(A)
for q in range(Q):
  ans = ans + (C[q]-B[q]) * dic.get(B[q],0)
  dic[C[q]] = dic.get(B[q],0) + dic.get(C[q],0)
  dic[B[q]] = 0
  print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
Q = int(input())
BC = [map(int,input().split()) for _ in range(Q)]
B, C = [i for i in zip(*BC)]
#print(B,C)

dic = {}
for a in A:
  dic[a] = dic.get(a,0) + 1

ans = sum(A)
for q in range(Q):
  bc = C(q) - B(q)
  ans = ans + bc * dic.get(B(q),0)
  dic[C(q)] = dic.get(C(q),0) + dic.get(B(q),0)
  dic[B(q)] = 0
  print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
Q = int(input())
BC = [list(map(int,input().split())) for i in range(Q)]
B, C = [list(i) for i in zip(*BC)]
#print(B,C,BC)

dic = {}
for a in A:
  dic[a] = dic.get(a,0) + 1
#print(dic)

ans = sum(A)
for q in range(Q):
  ans = ans + (C[q]-B[q]) * dic.get(B[q],0)
  dic[C[q]] = dic.get(B[q],0) + dic.get(C[q],0)
  del dic[B[q]]
  print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
Q = int(input())
BC = [list(map(int,input().split())) for i in range(Q)]
B, C = [list(i) for i in zip(*BC)]
#print(B,C,BC)

dic = {}
for a in A:
  dic[a] = dic.get(a,0) + 1
print(dic)

ans = sum(A)
for q in range(Q):
  ans = ans + (C[q]-B[q]) * dic.get(B[q],0)
  dic[C[q]] = dic.get(B[q],0) + dic.get(C[q],0)
  del dic[B[q]]
  print(ans)

Buggy submission (verdict: Runtime Error):
import bisect

N = int(input())
A = list(map(int,input().split()))

Q = int(input())

A.sort()
B = list(set(A))
X = [[0 for j in range(2)] for i in range(len(B))]
for i in range(len(B)):
  b=bisect.bisect_left(A,B[i])
  c=bisect.bisect_right(A,B[i])
  num = c - b #B[i]の要素数
  X[i][0] = B[i]
  X[i][1] = num

M = [0 for j in range(Q)]
N = [0 for j in range(Q)]
for i in range(Q):
  M[i],N[i] = map(int,input().split())

ans = int()
for i in range(Q):
  x = M[i]
  y = N[i]
  ans = 0
  jg = False
  for j in range(len(B)):
    if X[j][0] == y:
      jg = True
      jgx = j
  for j in range(len(B)):
    if X[j][0] == x:
      X[j][0] = y
      if jg = True:
        X[j][1] += X[jgx][1]
        X[jgx][0] = 0
    ans += X[j][0] * X[j][1]
  print(ans)
  #print(X)
Problem p02658 (python)

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
A.sort()

ans = 1

for i in range(N):
  if A[i] == 0:
    ans = 0
    break
  ans = ans * A[i]
  if ans > 1e+18:
    ans = -1
    break

print(ans)

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

ans = 1
for i in range(N):
  ans *= A[i]

if ans >= 1e+18:
  print(-1)
else:
  print(ans)
Problem p02687 (python)

Fixed submission:
S = input()

if S == 'ARC':
	print('ABC')
else:
	print('ARC')

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

if S = 'ARC':
	print('ABC')
else
	ptint('ARC')
Problem p02607 (python)

Fixed submission:
n = int(input())
arr = list(map(int, input().split()))
ans = 0
for i in range(0, n, 2):
  if arr[i]%2:ans+=1
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
arr = list(map(int, input().split()))
s = 0
for i in range(0, n, 2):
  if arr[i]%2:ans+=1
print(ans)
Problem p02717 (python)

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

print(h, n, m)

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



print(h, n, m)
Problem p02755 (python)

Fixed submission:
a, b = map(int, input().split())
# x = (a * 100) // 8
y = (b * 100) // 10

for i in range(y, y + 10):
  if (i * 10) // 100 == b and (i * 8) // 100 == a:
    print(i)
    exit()
print(-1)

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
# x = (a * 100) // 8
y = (b * 100) // 10

for i in range(y, y + 10):
  if (i * 10) // 100 = b and (i * 8) // 100 == a:
    print(i)
    exit()
print(-1)
Problem p02765 (python)

Fixed submission:
n, r = map(int, input().split())
if n >= 10:
  print(r)
else:
  print(r+100*(10-n))

Buggy submission (verdict: Runtime Error):
n, r = map(int, input.split())
if n >= 10:
  print(r)
else:
  print(r+100*(10-n))
Problem p02767 (python)

Fixed submission:
n = int(input())
arr = list(map(int, input().split()))
m = 1000000000000000
for p in range (1, max(arr)+1):
  r = 0
  for i in arr:
    r += (p-i)**2
  m = min(m, r)
print(m)

Buggy submission (verdict: Runtime Error):
n = int(input())
arr = list(map(int, input().spli()))
s = sum(arr)
p = s//n
r = 0
for i in arr:
  r += (p-i)**2
print(r)
Problem p02554 (python)

Fixed submission:
def powmod(a, n, p):
    if(n==0):
        return 2
    elif(n==1):
        return a%p
    elif(n%2==1):
        return ((a%p)*(powmod(a,n//2,p)**2%p))%p
    elif(n%2==0):
        return powmod(a,n//2,p)**2%p
N=int(input())
p=10**9+7
if(N==1):
    print(0)
else:
    print((powmod(10,N,p)-2*powmod(9,N,p)+powmod(8,N,p))%p)

Buggy submission (verdict: Runtime Error):
def powmod(a, n, p):
    if(n==0):
        return 1
    elif(n==1):
        return a%p
    elif(n%2==1):
        return ((a%p)*(powmod(a,n//2,p)**2%p))%p
    elif(n%2==0):
        return powmod(a,n//2,p)**2%p
N=int(input())
if(N==1):
  print(0)
else:
  print(powmod(10,N-2))
Problem p02742 (python)

Fixed submission:
H,W=map(int, input().split())
print(int((H*W-(H%2)*(W%2))/2+(H%2)*(W%2)) if(H!=1 and W!=1) else 1)

Buggy submission (verdict: Runtime Error):
H,W=map(int, input().split())
3 7
if(H%2==1 and W%2==1):
    print(int((W*H-1)/2))
else:
    print(int(W*H/2))

Buggy submission (verdict: Runtime Error):
H,W=map(int, input().split())
3 7
if(H%2==1 and W%2==1):
    print((W*H-1)/2)
else:
    print(W*H/2)

Buggy submission (verdict: Runtime Error):
H,W=map(int, input().split())
if(H%2==1 and W%2==1):
    print(W*H-1)
else(H%2==0 or H%2==0):
    print(W*H)
Problem p02747 (python)

Fixed submission:
S=input()
if(len(S)%2==0):
  for i in range(len(S)//2):
    if(S[2*i]!="h" or S[2*i+1]!="i"):
      print("No")
      break
  else:
    print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a,b,m=map(int, input().split())
list_a=[ int(i)  for i in input().split()]
list_b=[ int(i)  for i in input().split()]
x,y,c=([],[],[])
for i in range(m):
    s=list(map(int, input().split()))
    x+=[s[0]]
    y+=[s[1]]
    c+=[s[2]]
print(min([ list_a[x[i]-1] + list_b[y[i]-1] - c[i]   for i in range(len(c))]+[min(list_a)+min(list_b)]))

Buggy submission (verdict: Runtime Error):
S=input()
hihihihi
if(len(S)%2==0):
  for i in range(len(S)//2):
    if(S[2*i]!="h" or S[2*i+1]!="i"):
      print("No")
      break
  else:
    print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
S=input()
if(len(S)%2==0):
  for in in range(S//2):
    if(S[2*i]!="h" or S[2*i+1]!="i"):
      print("No")
      break
  else:
    print("Yes")
else:
  print("No")
Problem p02755 (python)

Fixed submission:
A, B =map(int, input().split())
max_A=(A+1)*25/2
max_B=10*(B+1)
p=int(round(max([A*12.5,B*10])+0.4999999999,0))
print(p if(p<min([(A+1)*25/2, 10*(B+1)]) and not(4<5*A-4*B) and not(5*A-4*B<-5)) else -1)

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split())
min_a=12.5*A
max_a=(100*A+1)/8
min_b=10*B
max_b=min_B+1
if(max_b<min_a or max_a<min_b):
  print(-1)
else:
  print(int(round(max(12.5*A,10*B)+0.4999999,0)))

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split())
min_a=12.5*A;max_a=(100*a+1)/8
min_b=10*b;max_b=min_b+1
if(max_b<min_a or max_a<min_b):
  print(-1)
else:
  print(int(round(max(12.5*A,10*B)+0.4999999,0)))

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split())
min_a=12.5*A;max_a=(100a+1)/8
min_b=10*B;max_b=min_b+1
if(max_b<min_a or max_a<min_b):
  print(-1)
else:
  print(int(round(max(12.5*A,10*B)+0.4999999,0)))

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split())
min_a=12.5*A;max_a=(100a+1)/8
min_b=10*b;max_b=min_b+1
if(max_b<min_a or max_a<min_b):
  print(-1)
else:
  print(int(round(max(12.5*A,10*B)+0.4999999,0)))
Problem p02767 (python)

Fixed submission:
N=int(input())
List=[int(i) for i in input().split()]
P=int(round(sum(List)/N,0))
def length(x):
 return sum([(i-P-x)**2 for i in List])

i=0
data=length(0)
while True:
 if(length(i-1)<length(i)<length(i+1)):
  i-=1
 elif(length(i-1)>length(i)>length(i+1)):
  i+=1
 else:
  print(length(i))
  break

Buggy submission (verdict: Runtime Error):
N=int(input())
List=[int(i) for i in input().split()]
P=int(round(sum(List)/N,0))
def length(x):
 return sum([(i-P-x)**2 for i in List])
i=0
data=length(0)
while True:
 if(length(i-1)<length(i)<length(i+1)):
  i-=1
 elif(length(i-1)>length(i)>length(i+1)):
  i+=1
 else:
  print((length(i))
  break
Problem p03059 (python)

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

mul = (t + 0.5) // a

print(int(b * mul))

Buggy submission (verdict: Runtime Error):
import numpy as np
 
N = input()
A = np.array([int(x) for x in input().split(" ")])

if len(np.where(A>0)[0])%2 == 0:
  print(np.abs(A).sum())
else:
  print(np.abs(A).sum() - np.abs(A).min()*2)
Problem p02657 (python)

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

Buggy submission (verdict: Runtime Error):
if(1<=a<=100 || 1<=b<=100)
	a = int(input())
	b = int(input())
	print(a*b)
else
	print("invail")

Buggy submission (verdict: Runtime Error):
if(1<=a<=100 || 1<=b<=100)
	int(a) = input()
	int(b) = input()
	print(a*b)
else
	print("invail")

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

Buggy submission (verdict: Runtime Error):
a = input()
 = input()
print(a* )

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
print(a*b)
Problem p02717 (python)

Fixed submission:
x,y,z = list(map(int,input().split()))
 
def swap(a,b):
    tmp = a
    a = b
    b = tmp
    return (a,b)
 
x,y = swap(x,y)
x, z = swap(x, z)
print(x,y,z)

Buggy submission (verdict: Runtime Error):
x,y,z = list(map(int,input().split()))
 
def swap(a,b):
    tmp = a
    a = b
    b = tmp
    return (a,b)
 
x,y = swap(x,y)
x, z = swap(x, z)
print(x,y,z)