Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
#https://atcoder.jp/contests/abc121/tasks/abc121_c

import numpy as np

n,m=map(int,input().split())

ablist=np.array([list(map(int,input().split())) for i in range(n)])

#aの昇順にソート
newablist=ablist[ablist[:,0].argsort(),:]
x=newablist


costcount=0
i=0

while x[i][1]<= m:
	m -= x[i][1]
	costcount += x[i][0]*x[i][1]
	i += 1

costcount += m*x[i][0]


print(costcount)









Fixed submission:
#https://atcoder.jp/contests/abc121/tasks/abc121_c

import numpy as np

n,m=map(int,input().split())

ablist=np.array([list(map(int,input().split())) for i in range(n)])

#aの昇順にソート
newablist=ablist[ablist[:,0].argsort(),:]
x=newablist


costcount=0
i=0

while i<n and x[i][1]<= m:
	m -= x[i][1]
	costcount += x[i][0]*x[i][1]
	i += 1

if i < n:
	costcount += m*x[i][0]


print(costcount)
Buggy python submission (verdict: Time Limit Exceeded):
#AからBまでの排他的論理和を出す

a,b=map(int,input().split())
count=0
for i in range(a,b+1):
	count=count^i

print(count)


Fixed submission:
#AからBの排他的論理和　計算短縮版

import math
a,b=map(int,input().split())
c=0
list=[]
d=0


number_of_1=0
sum_of_1=0
nose=0
tail=0

if a%2==0:
	number_of_1=(b+1-a)//2
else:
	number_of_1=(b-a)//2

sum_of_1=number_of_1 % 2

if a%2==0:
	nose=0
else:
	nose=a

if b%2==0:
	tail=b
else:
	tail=0

print(nose^tail^sum_of_1)

Buggy python submission (verdict: Time Limit Exceeded):
#AからBまでの排他的論理和を出す

a,b=map(int,input().split())
count=0
for i in range(a,b+1):
	count=count^i

print(count)


Fixed submission:
#AからBの排他的論理和　計算短縮版

import math
a,b=map(int,input().split())
c=0
list=[]
d=0


number_of_1=0
sum_of_1=0
nose=0
tail=0

if a%2==0:
	number_of_1=(b+1-a)//2
else:
	number_of_1=(b-a)//2

sum_of_1=number_of_1 % 2

if a%2==0:
	nose=0
else:
	nose=a

if b%2==0:
	tail=b
else:
	tail=0

print(nose^tail^sum_of_1)
Buggy python submission (verdict: Time Limit Exceeded):
#https://atcoder.jp/contests/abc113/tasks/abc113_c


n,m=map(int,input().split())
PY=[list(map(int,input().split()))+[0] for i in range(m)]

sortPY=sorted(PY,key=lambda x: (x[0],x[1]))
Plist=[sortPY[i][0] for i in range(m)]

for i in range(m):
	sortPY[i][2]=Plist[0:i+1].count(Plist[i])


for i in range(m):
	print(str(PY[i][0]).zfill(6)+str(PY[i][2]).zfill(6))








Fixed submission:
#https://atcoder.jp/contests/abc113/tasks/abc113_c


n,m=map(int,input().split())
PY=[list(map(int,input().split()))+[0] for i in range(m)]

sortPY=sorted(PY,key=lambda x: x[1])

city={}

for i in range(m):
	p=sortPY[i][0]
	if p in city:
		city[p]+=1
	else:
		city[p]=1
	sortPY[i][2]=city[p]


for i in range(m):
	print(str(PY[i][0]).zfill(6)+str(PY[i][2]).zfill(6))

Buggy python submission (verdict: Time Limit Exceeded):
#https://atcoder.jp/contests/abc113/tasks/abc113_c


n,m=map(int,input().split())
PY=[list(map(int,input().split()))+[i]+[0] for i in range(m)]

sortPY=sorted(PY,key=lambda x: (x[0],x[1]))
Plist=[sortPY[i][0] for i in range(m)]

for i in range(m):
	sortPY[i][3]=Plist[0:i+1].count(Plist[i])

correctPY=sorted(sortPY,key=lambda x:x[2])

for i in range(m):
	print(str(correctPY[i][0]).zfill(6)+str(correctPY[i][3]).zfill(6))








Fixed submission:
#https://atcoder.jp/contests/abc113/tasks/abc113_c


n,m=map(int,input().split())
PY=[list(map(int,input().split()))+[0] for i in range(m)]

sortPY=sorted(PY,key=lambda x: x[1])

city={}

for i in range(m):
	p=sortPY[i][0]
	if p in city:
		city[p]+=1
	else:
		city[p]=1
	sortPY[i][2]=city[p]


for i in range(m):
	print(str(PY[i][0]).zfill(6)+str(PY[i][2]).zfill(6))
Buggy python submission (verdict: Runtime Error):
#お札が合計N枚ある時に合計金額がY円になる枚数の組み合わせ　存在しない場合は（-1,-1,-1）
  
n=int(input())
y=int(input())
a,b,c=-1,-1,-1

for i in range(n):
	for j in range(n-i):
		if 10000*i + 5000*j + 1000*(n-i-j) ==y:
			a,b,c=i,j,(n-i-j)

print(a,b,c)

Fixed submission:
#お札が合計N枚ある時に合計金額がY円になる枚数の組み合わせ　存在しない場合は（-1,-1,-1）
  
n,y=map(int,input().split())
a,b,c=-1,-1,-1

for i in range(n+1):
	for j in range(n-i+1):
		if 10000*i + 5000*j + 1000*(n-i-j) ==y:
			a,b,c=i,j,(n-i-j)

print(a,b,c)
Buggy python submission (verdict: Runtime Error):
#1以上N以下の整数のうち、10進法で各桁の和がA以上B以下であるものについて総和
  
n=int(input())
a=int(input())
b=int(input())

def s(x):
        return x//10000 + x%10000//1000 + x%1000//100 + x%100//10 + x%10

sum=0

for i in range(n+1):
        if a<=int(s(i))<=b:
                sum+=i

print(sum)

Fixed submission:
#天秤
  
a,b,c,d=map(int,input().split())

l=a+b
r=c+d

if l==r:
	print("Balanced")
else:
	if l>r:
		print("Left")
	else:
		print("Right")
Buggy python submission (verdict: Runtime Error):
#天秤
  
a,b,c,d=map(int,input().split())

l=a+b
r=c+d

if l==r:
	print("Balanced")
else:
	if l>r:
		print("Left")
	else:
		print("Right")

Fixed submission:
#1以上N以下の整数のうち、10進法で各桁の和がA以上B以下であるものについて総和
  
n,a,b=map(int,input().split())
def s(x):
        return x//10000 + x%10000//1000 + x%1000//100 + x%100//10 + x%10

sum=0

for i in range(n+1):
        if a<=int(s(i))<=b:
                sum+=i

print(sum)

Buggy python submission (verdict: Runtime Error):
#天秤
  
a,b,c,d=map(int,input().split())

l=a+b
r=c+d

if l==r:
	print("Balanced")
else:
	if l>r:
		print("Left")
	else:
		print("Right")

Fixed submission:
#1以上N以下の整数のうち、10進法で各桁の和がA以上B以下であるものについて総和
  
n,a,b=map(int,input().split())
def s(x):
        return x//10000 + x%10000//1000 + x%1000//100 + x%100//10 + x%10

sum=0

for i in range(n+1):
        if a<=int(s(i))<=b:
                sum+=i

print(sum)

Buggy python submission (verdict: Runtime Error):
#1以上N以下の整数のうち、10進法で各桁の和がA以上B以下であるものについて総和
  
n=int(input())
a=int(input())
b=int(input())
 
def s(x):
        return x//10000 + x%10000//1000 + x%1000//100 + x%100//10 + x%10
 
sum=0
 
for i in range(n+1):
        if a<=int(s(i))<=b:
                sum+=i
 
print(sum)

Fixed submission:
#1以上N以下の整数のうち、10進法で各桁の和がA以上B以下であるものについて総和
  
n,a,b=map(int,input().split())
def s(x):
        return x//10000 + x%10000//1000 + x%1000//100 + x%100//10 + x%10

sum=0

for i in range(n+1):
        if a<=int(s(i))<=b:
                sum+=i

print(sum)
Buggy python submission (verdict: Time Limit Exceeded):
#英小文字からなる文字列 S が与えられます。T が空文字列である状態から始めて、以下の操作を好きな回数繰り返すことで S=T とすることができるか判定してください。
#T の末尾に "dream", "dreamer", "erase", "eraser" のいずれかを追加する。


s=input()
s1="dream"
s2="dreamer"
s3="erase"
s4="eraser"
l=len(s)

rest="NO"

while l>4:
	if s[-5:]==s1 or s[-5:]==s3:
		s=s[0:-5]
		l=l-5
	elif s[-6:]==s4:
		s=s[0:-6]
		l=l-6
	elif s[-7:]==s2:
		l=l-7
		s=s[0:-7]

if l==0:
	rest="YES"

print(rest)

Fixed submission:
#英小文字からなる文字列 S が与えられます。T が空文字列である状態から始めて、以下の操作を好きな回数繰り返すことで S=T とすることができるか判定してください。
#T の末尾に "dream", "dreamer", "erase", "eraser" のいずれかを追加する。


s=input()
s1="dream"
s2="dreamer"
s3="erase"
s4="eraser"
l=len(s)

rest="NO"

while l>4:
	if s[-5:]==s1 or s[-5:]==s3:
		s=s[0:-5]
		l=l-5
	elif s[-6:]==s4:
		s=s[0:-6]
		l=l-6
	elif s[-7:]==s2:
		l=l-7
		s=s[0:-7]
	else:
		break

if l==0:
	rest="YES"

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

if a+b+c==17 and a*b*c==175:
　print("YES")
else:
　print("NO")

Fixed submission:
a,b,c=map(int,input().split())
if a+b+c==17 and a*b*c==175:
 print("YES")
else:
 print("NO")
Buggy python submission (verdict: Runtime Error):
s = input()
r = []
for i in range(len(s)):
    if s[i] == "0":
        r.append("0")
    elif s[i] == "1":
        r.append("1")
    elif s[0] == "B":
        continue
    else:
        del r[-1]



print("".join(r))


Fixed submission:
s = input()
r = []
for i in range(len(s)):
    if s[i] == "0":
        r.append("0")
    elif s[i] == "1":
        r.append("1")
    elif s[i] == "B" and len(r) != 0:
        del r[-1]

    else:
        continue
print("".join(r))
Buggy python submission (verdict: Runtime Error):
a,b,c,d = sorted(input())
print (Bad)


Fixed submission:
a,b,c,d = input()
if a==b or b==c or c==d:
    print ("Bad")
else:
    print ("Good")
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
f = int(input())
k = int(input())

if e-a > k:
    print(":(")
else:
    print("Yay!")

# for i in range(4):
#     for j in range(4):
#         if i<j :
#             print("." * j)
#             continue
#         print(f"i={i}, j={j}")
#
# print()

# numlist = [3, 4.2, 10, "x", 1, 9]
#
# sum = 0
# for num in numlist :
#     if not isinstance(num, (int,float)):
#         print(num, "数値ではありません。")
#         continue
#     sum += num
#     print(num, "/", sum)

# print(1,2, sep ="/")


Fixed submission:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if e-a > k:
    print(":(")
else:
    print("Yay!")

Buggy python submission (verdict: Runtime Error):
a,b,c,d,e,k = map(int, input().split)

legth = max(b-a,c-b,d-c,e-d)

if legth > k:
    print(":(")
else:
    print("Yay!")

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if e-a > k:
    print(":(")
else:
    print("Yay!")
Buggy python submission (verdict: Runtime Error):
def f(X,Y):
    return X//Y

A,B,C,D = map(int, input().split())
X = B-A+1
if (C>D):
    x = C
    y = D
else:
    y = C
    x = D

r = x % y
while(r!=0):
    x = y
    y = r
    r = x % y

print("%d" % (X - f(X, C) - f(X, D) + f(X, C*D//y)))

Fixed submission:
S = input()
prev = S[0]
for s in S[1:]:
  if s == prev:
    print("Bad")
    exit()
  prev = s
    
print("Good")

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

for i in range(3):
    if str(a)[i] == str(a)[i+1]:
        print(i)
        print("Good")
        break
    elif i == 2:
        print("Bad")

Fixed submission:
x = input()
def samenum(string):
  for i in range(3):
    if string[i] == string[i+1]:
        return "Bad"
        quit()
  return "Good"
 
print(samenum(x))
Buggy python submission (verdict: Runtime Error):
s= input()
if s[0]=='Y' and  s[1]=='A' and s[2]=='K' and s[3]=='I':
    print("Yes")
else:
    print("No")

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

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

Fixed submission:
s= input()
if len(s)>3 and s[0]=='Y' and  s[1]=='A' and s[2]=='K' and s[3]=='I':
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
N,X = map(int,input().split())
L = list(map(int,input().split()))

I = 0
A = 1
for i in L:
  I+=i
  if I <= X:
    A += 1
print(A)

Fixed submission:
a,b = map(int,input().split())
if a < b :
  print("0")
else:
  print("10")
Buggy python submission (verdict: Runtime Error):
n = int(input())
k = 0
alist = []
while k < n :
  a = list(map(int,input().split()))
  alist.append(a)
  k += 1
#
for blist in alist :
  b = blist[0]
  blist.remove(b)
#
anslist = []
ans = 0
i_roop = len(alist[0])
while i_roop >= 0 :
  if i_roop == 0 :
    break
  else:
    c = min(alist[0])
    for j in range(1,n) :
      if c in alist[j] :
        anslist.append("OK")
        if j == n-1 :
          if len(anslist) == n-1 :
            ans += 1
      else:
        if j == n-1 :
          if len(anslist) == n-1 :
            ans += 1
        break
    alist[0].remove(c)
  anslist = []
  i_roop += -1

print(ans)

Fixed submission:
n,m = map(int,input().split())
k = 0
alist = []
while k < n :
  a = list(map(int,input().split()))
  alist.append(a)
  k += 1
#
if n == 1 :
  print(len(alist[0])-1)
else:
  for blist in alist :
    b = blist[0]
    blist.remove(b)
#
  anslist = []
  ans = 0
  i_roop = len(alist[0])
  while i_roop >= 0 :
    if i_roop == 0 :
      break
    else:
      c = min(alist[0])
      for j in range(1,n) :
        if c in alist[j] :
          anslist.append("OK")
          if j == n-1 :
            if len(anslist) == n-1 :
              ans += 1
        else:
          if j == n-1 :
            if len(anslist) == n-1 :
              ans += 1
          break
      alist[0].remove(c)
    anslist = []
    i_roop += -1

if n != 1 :
  print(ans)
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
alist = list(map(int, input().split()))
alist.sort()
blist = []
for i in range(0,m-1):
  blist.append(alist[i+1] - alist[i])
b1 = alist[m-1] - alist[0]
b2 = max(blist)
print(b1 - b2)

Fixed submission:
n, m = map(int, input().split())
alist = list(map(int, input().split()))
alist.sort()
blist = []

if n >= m :
  print(0)
elif n == 1:
  print(alist[m-1] - alist[0])
else:
  for i in range(0,m-1):
    blist.append(alist[i+1] - alist[i])
  blist.sort()
  d = -1 * (n-1)
  c = sum(blist[d:])
  b1 = alist[m-1] - alist[0]
  print(b1 - c)
Buggy python submission (verdict: Runtime Error):
n = int(input())
v_list = list(map(int, input().split()))
c_list = list(map(int, input().split()))
sum = 0

for v, c in zip(v_list, c_list):
    if v - c > 0:
        sum += v - c

print(sum)


Fixed submission:
a, b, t = map(int, input().split())
print(t // a * b)
Buggy python submission (verdict: Runtime Error):
n = int(input())
h_list = map(int, input().split())
highest = max(h_list)
count = 1

for i in range(1, n):
    if highest <= h_list[i]:
        count += 1

print(count)


Fixed submission:
n = int(input())
h_list = list(map(int, input().split()))
highest = 0
count = 0

for i in range(n):
    if highest <= h_list[i]:
        count += 1
        highest = h_list[i]

print(count)
Buggy python submission (verdict: Runtime Error):
s = list(input())

prev = s[0]
count  = 0
for i in range(1, len(s)):
    print(s)
    if prev == s[i]:
        count += 1

        if prev == '0':
            s[i] = '1'
        else:
            s[i] = '0'

    prev = s[i]

print(count)

Fixed submission:
s = list(input())

count1  = 0
count2 = 0

for i in range(len(s)):
    if i % 2 == 0 and s[i] == '1':
        count1 += 1
    elif i % 2 and s[i] == '0':
        count1 += 1

    if i % 2 == 0 and s[i] == '0':
        count2 += 1
    elif i % 2 and s[i] == '1':
        count2 += 1

print(min(count1, count2))
Buggy python submission (verdict: Runtime Error):
b = input()

if b = 'A':
    print('T')
elif b = 'T':
    print('A')
elif b = 'C':
    print('G')
elif b = 'G':
    print('C')
else:
    pass


Fixed submission:
b = input()

if b == 'A':
    print('T')
elif b == 'T':
    print('A')
elif b == 'C':
    print('G')
elif b == 'G':
    print('C')
else:
    pass
Buggy python submission (verdict: Runtime Error):
s = input()
max = 0
count = 0

for i in range(len(s)):
    if s[i] in ['A', 'C', 'G', 'T']:
        count += 1
    else:
        if count > max:
            max = count
            count = 0

print(max(max, count))


Fixed submission:
s = input()
max_count = 0
count = 0

for i in range(len(s)):
    if s[i] in ['A', 'C', 'G', 'T']:
        count += 1
    else:
        if count > max_count:
            max_count = count
            count = 0

print(max(max_count, count))
Buggy python submission (verdict: Time Limit Exceeded):
n, q = map(int, input().split())
s = input()
count = 0
ans = []
for _ in range(q):
    l, r = map(int, input().split())
    partial = s[l-1:r]

    for i in range(len(partial) - 1):
        if partial[i] and partial[i + 1]:
            if partial[i] == 'A' and partial[i + 1] == 'C':
                count += 1

    ans.append(count)
    count = 0

for a in ans:
    print(a)


Fixed submission:
n, q = map(int, input().split())
s = input()
t = [0] * (n + 1)

count = 0
for i in range(n - 1):
    if s[i:i+2] == 'AC':
        t[i + 1] = t[i] + 1
    else:
        t[i + 1] = t[i]

for i in range(q):
    l, r = map(int, input().split())
    print(t[r - 1] - t[l - 1])
Buggy python submission (verdict: Runtime Error):
n, m, c = map(int, input().split())
b_list = list(map(int, input().split()))
count = 0

for _ in range(n):
    a_list = list(map(int, input().split()))
    sum = c

    for i in range(m):
        sum += a_list[i] * b_list[i]

    if sum > 0:
        count += 1

print(count)


Fixed submission:
H, W = map(int, input().split())
h, w = map(int, input().split())
print((H - h) * (W - w))
Buggy python submission (verdict: Runtime Error):
a, b, k = map(int, input().split())
divisers = []

for i in range(1, min(a, b) + 1):
    if a % i == 0 and b % i == 0:
        divisers.append(i)

print(divisers[-k])


Fixed submission:
a, b, c = map(int, input().split())
print(min(b // a, c))

Buggy python submission (verdict: Runtime Error):
a, b, k = map(int, input().split())
divisers = []

for i in range(1, max(a, b) + 1):
    if a % i == 0 and b % i == 0:
        divisers.append(i)

print(divisers[-k])


Fixed submission:
a, b, c = map(int, input().split())
print(min(b // a, c))

Buggy python submission (verdict: Runtime Error):
a, b, k = map(int, input().split())
divisers = []

for i in range(1, max(a, b) + 1):
    if a % i == 0 and b % i == 0:
        divisers.append(i)

print(divisers[-k])


Fixed submission:
a, b, c = map(int, input().split())
print(min(b // a, c))
Buggy python submission (verdict: Runtime Error):
a, b, k = map(int, input().split())
divisers = []

for i in range(1, max(a, b)):
    if a % i == 0 and b % i == 0:
        divisers.append(i)

print(divisers[-k])


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

for i in range(1, min(a, b) + 1):
    if a % i == 0 and b % i == 0:
        divisers.append(i)

print(divisers[-k])
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
ans = [0] * m

for _ in range(n):
    a = list(map(int, input().split()))
    for i in a[1:]:
        ans[i] += 1

print(ans.count(n))


Fixed submission:
n, m = map(int, input().split())
ans = [0] * m
for _ in range(n):
    a = list(map(int, input().split()))
    
    for i in a[1:]:
        ans[i-1] += 1

print(ans.count(n))
Buggy python submission (verdict: Runtime Error):
s = int(input())
a = [s]

for i in range(2, 1000001):
  if s % 2 == 0:
    s = s / 2
  else:
    s = 3 * s + 1
  
  if s in a:
    print(i)
    break
   
  s.append(s)

Fixed submission:
s = int(input())
a = [s]

for i in range(2, 1000001):
  if s % 2 == 0:
    s = s / 2
  else:
    s = 3 * s + 1
  
  if s in a:
    print(i)
    break
   
  a.append(s)
Buggy python submission (verdict: Runtime Error):
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))

min = float('inf')
idx = None
for i in range(len(H)):
    if min > abs(A - T + H[i] * 0.006):
        idx = i + 1å

print(i)

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

H = [abs(A - T + h * 0.006) for h in H]

print(H.index(min(H)) + 1)
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
print(max(a, b, c) * 9 + sum(a, b, c))


Fixed submission:
a, b, c = map(int, input().split())
print(max([a, b, c]) * 9 + sum([a, b, c]))
Buggy python submission (verdict: Runtime Error):
K = int(input())

even = K // 2
odd = K - enve
print(even * odd)

Fixed submission:
K = int(input())

even = K // 2
odd = K - even
print(even * odd)
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
print(max(a + b, a - b, a * b)

Fixed submission:
a, b = map(int, input().split())
print(max(a + b, a - b, a * b))
Buggy python submission (verdict: Runtime Error):
s = list(input())

if s.find('a') and s.find('b') and s.find('c'):
  print('Yes')
else:
  print('No')

Fixed submission:
s = list(input())

if 'a' in s and 'b' in s and 'c' in s:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
a = int(input())
b, c = map(int, input().split())
s= input()
print("{} {}".format(a+b+c, s))

Fixed submission:
a, b = map(int, input().split())
if (a * b) % 2:
    print('Odd')
else:
    print('Even')
Buggy python submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
res = (a + b) - (c + d)

if res == 0:
  pritn("Balanced")
elif res > 0:
  print("Left")
else:
  print("Right")

Fixed submission:
a, b, c, d = map(int, input().split())
res = (a + b) - (c + d)

if res == 0:
  print("Balanced")
elif res > 0:
  print("Left")
else:
  print("Right")
Buggy python submission (verdict: Runtime Error):
from math import round

a, b = map(int, input().split())
print(round(avg([a, b])))

Fixed submission:
a, b = map(int, input().split())
print((a + b + 1) // 2)

Buggy python submission (verdict: Runtime Error):
from math import round

a, b = map(int, input().split())
print(round(avg(a, b)))

Fixed submission:
a, b = map(int, input().split())
print((a + b + 1) // 2)

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

a, b = map(int, input().split())
print(round(avg(a, b)))

Fixed submission:
a, b = map(int, input().split())
print((a + b + 1) // 2)
Buggy python submission (verdict: Runtime Error):
a, b =  = input().split()

if a > b:
  print(">")
elif a == b:
  print("=")
else:
  print("<")

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

if a > b:
  print(">")
elif a == b:
  print("=")
else:
  print("<")
Buggy python submission (verdict: Runtime Error):
W,H,x,y=map(int,input().split());print(W*H/2,(W%x==0 and H%y==0)*1)

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

Buggy python submission (verdict: Runtime Error):
W,H,x,y=map(int,input().split());print(str(W*H/2)+' 1' if W%x==0 and H%y==0 else str(W*H/2)+' 0')

Fixed submission:
W,H,x,y=map(int,input().split());print(W*H/2,1*(W/2==x and H/2==y))
Buggy python submission (verdict: Runtime Error):
N,K=list(map(int,input().split()))
h=[int(input()) for i in range(N)]
 
h.sort()
 
m="a"
for i in range(N-K+1):
	if m=="a" or m>h[i+K-1]-h[i]: m=h[i+K-1]-h[i]
 
print(m)

Fixed submission:
d = int(input())
if(d==25):
    print("Christmas")
elif(d==24):
    print("Christmas Eve")
elif(d==23):
    print("Christmas Eve Eve")
else:
    print("Christmas Eve Eve Eve")

Buggy python submission (verdict: Runtime Error):
N, K = list(map(int,input().split()))
h =  [int(input()) for i in range(N)]
h.sort()
m = "a"
for i in range(N - K + 1):
    if m=="a" or m>h[i+K-1]:
        m = h[i+K-1] - h[i]
print(m)

Fixed submission:
d = int(input())
if(d==25):
    print("Christmas")
elif(d==24):
    print("Christmas Eve")
elif(d==23):
    print("Christmas Eve Eve")
else:
    print("Christmas Eve Eve Eve")

Buggy python submission (verdict: Runtime Error):
N = int(input())
p = []
for i in range(N):
    _p = int(input())
    p.append(_p)
biggest = 0
j = 0
for i in range(N):
    if(p[i]>=biggest):
        j = i
        biggest=p[i]
p[j] = p[j] / 2
print(int(sum(p)))

Fixed submission:
d = int(input())
if(d==25):
    print("Christmas")
elif(d==24):
    print("Christmas Eve")
elif(d==23):
    print("Christmas Eve Eve")
else:
    print("Christmas Eve Eve Eve")

Buggy python submission (verdict: Runtime Error):
N = int(input())
p = []
for i in range(N):
    _p = int(input())
    p.append(_p)
biggest = 0
j = 0
for i in range(N):
    if(p[i]>biggest):
        j = i
        biggest=p[i]
p[j] = p[j] / 2
print(int(sum(p)))

Fixed submission:
d = int(input())
if(d==25):
    print("Christmas")
elif(d==24):
    print("Christmas Eve")
elif(d==23):
    print("Christmas Eve Eve")
else:
    print("Christmas Eve Eve Eve")
Buggy python submission (verdict: Runtime Error):
N = int(input())
T,A = map(int,input().split())
h = list(map(int,input().split()))
#iは番号
ans = 0
base = T - 0.006*h[0]
for i,n in enumerate(h):
    if(i==0):
        pass
    tem = T - 0.006*n
    if(abs(tem - A)<abs(base - A)):
        base = tem
        ans = i+1
    else:
        ans = 1
print(ans)


Fixed submission:
x, y = map(int,input().split())
y = 1/2 * y
ans = int(x + y)
print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
T,A = map(int,input().split())
h = list(map(int,input().split()))
#iは番号
ans = 0
base = T - 0.06*h[0]
for i,n in enumerate(h):
    if(i==0):
        pass
    tem = T - 0.006*n
    if(abs(tem - A)<abs(base - A)):
        base = tem
        ans = i+1
    else:
        ans = 1
print(ans)


Fixed submission:
x, y = map(int,input().split())
y = 1/2 * y
ans = int(x + y)
print(ans)
Buggy python submission (verdict: Runtime Error):
L, N = list(map(int, input().split()))
S = [input() for i in range(N)]
S.sort()
ans = "";
for j in range(N):
    ans += S[j]
print(ans)


Fixed submission:
A, B, C = list(map(int, input().split()))
if A + B + C == 17:
    print("YES")
else:
    print("NO")