Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
X=int(input())
def momo(s)
if int(s)>X:
  return 0
 
nagi=1 if all(s.count(c)>0 for c in '753') else 0
  for c in '753':
    nagi+=momo(s+c)
    return nagi
print(momo('0'))

Fixed submission:
X=int(input())
def momo(s):
  if int(s)>X:
    return 0
  nagi=1 if all(s.count(c)>0 for c in '753') else 0
  for c in '753':
    nagi+=momo(s+c)
  return nagi
print(momo('0'))

Buggy python submission (verdict: Runtime Error):
X=int(input())
def momo(s)
if int(s)>N:
  return 0

nagi=1 if all(s.count(c)>0 for c in '753') else 0
  for c in '753':
    nagi+=momo(s+c)
    return nagi
print(momo('0'))

Fixed submission:
X=int(input())
def momo(s):
  if int(s)>X:
    return 0
  nagi=1 if all(s.count(c)>0 for c in '753') else 0
  for c in '753':
    nagi+=momo(s+c)
  return nagi
print(momo('0'))
Buggy python submission (verdict: Runtime Error):
X,Y=int(input().split())
C=X+Y/2
print(C)

Fixed submission:
X,Y=map(int,input().split())
x=int(X+Y/2)
print(x)

Buggy python submission (verdict: Runtime Error):
#A-B間の運賃の入力
X = int(input())
#B-C間の運賃の入力
Y = int(input())
#制約
if  X < 0 or Y%2 != 0 or Y > 100:
    SystemExit
#A-C合計運賃の計算と出力
print(X+Y/2)

Fixed submission:
#A-B間の運賃の入力 #B-C間の運賃の入力
X, Y= map(int, input().split())
#制約
if  X < 1 or Y%2 != 0 or Y > 100:
    SystemExit
#A-C合計運賃の計算と出力
print(int(X+Y/2))

Buggy python submission (verdict: Runtime Error):
#A-B間の運賃の入力
X = int(input())
#B-C間の運賃の入力
Y = int(input())
#制約
if X < 1 or Y > 100 or Y%2 == 0:
#A-C合計運賃の計算と出力
print(X+Y/2)

Fixed submission:
#A-B間の運賃の入力 #B-C間の運賃の入力
X, Y= map(int, input().split())
#制約
if  X < 1 or Y%2 != 0 or Y > 100:
    SystemExit
#A-C合計運賃の計算と出力
print(int(X+Y/2))

Buggy python submission (verdict: Runtime Error):
#A-B間の運賃の入力
a = int(input())
#B-C間の運賃の入力
b = int(input())
#A-C合計運賃の計算と出力
print(a+b/2)


Fixed submission:
#A-B間の運賃の入力 #B-C間の運賃の入力
X, Y= map(int, input().split())
#制約
if  X < 1 or Y%2 != 0 or Y > 100:
    SystemExit
#A-C合計運賃の計算と出力
print(int(X+Y/2))
Buggy python submission (verdict: Runtime Error):
# 帰宅経路数と時間を取得
N, T = map(int, input().split())
# 時間制限
ans = 1001
# N個の帰宅経路と時間を取得し、比較する
for i in range(N):
    cost, time = map(int, input().split())
    if time < T:
        ans = min(ans, cost)
# 出力する
if ans == 1001:
    print("TLE")
else:
    print(ans)

Fixed submission:
#年齢を取得
N = int(input())
#年齢による条件判断
if N == 1:
    print('Hello World')
elif N == 2:
    #AとBの値を取得
    A = int(input())
    B = int(input())
    #制約の判断
    if A < 1 or A > 9 or B < 1 or B > 9:
        SystemExit
    print(A+B)

Buggy python submission (verdict: Runtime Error):
# 帰宅経路数と時間を取得
N, T = map(int, input().split())
# 時間制限
ans = 1001
# 制約判断
if N < 1 or N > 100 or T < 1 or T > 1000:
    SystemExit
# N個の帰宅経路と時間を取得し、比較する
for i in range(N):
    cost, time = map(int, input().split())
    if time < T:
        ans = min(ans, cost)
# 出力する
if ans == 1001:
    print("TLE")
else:
    print(ans)

Fixed submission:
#年齢を取得
N = int(input())
#年齢による条件判断
if N == 1:
    print('Hello World')
elif N == 2:
    #AとBの値を取得
    A = int(input())
    B = int(input())
    #制約の判断
    if A < 1 or A > 9 or B < 1 or B > 9:
        SystemExit
    print(A+B)
Buggy python submission (verdict: Runtime Error):
N, T = map(int, input().split())
ans = 1001
for i in range(N):
    cost, tm = map(int, input().split())
    if tm <＝ T:
        ans = min(ans, cost)
if ans == 1001:
    ans = "TLE"
print(ans)

Fixed submission:
n, l = map(int, input().split())
ans = 1001
for i in range(n):
    c, t = map(int, input().split())
    if t <= l:
        ans = min(ans, c)
if ans == 1001:
    ans = "TLE"
print(ans)

Buggy python submission (verdict: Runtime Error):
# 帰宅経路数と時間を取得
N, T = map(int, input().split())
# 時間制限
ans = 1001
# N個の帰宅経路と時間を取得し、比較する
for i in range(N):
    cost, time = map(int, input().split())
    if time <＝ T:
        ans = min(ans, cost)
# 出力する
if ans == 1001:
    ans = "TLE"
print(ans)

Fixed submission:
n, l = map(int, input().split())
ans = 1001
for i in range(n):
    c, t = map(int, input().split())
    if t <= l:
        ans = min(ans, c)
if ans == 1001:
    ans = "TLE"
print(ans)

Buggy python submission (verdict: Runtime Error):
# 帰宅経路数と時間を取得
N, T = map(int, input().split())
# 時間制限
ans = 1001
# N個の帰宅経路と時間を取得し、比較する
for i in range(N):
    cost, time = map(int, input().split())
    if time <＝ T:
        ans = min(ans, cost)
# 出力する
if ans == 1001:
    print("TLE")
else:
    print(ans)

Fixed submission:
n, l = map(int, input().split())
ans = 1001
for i in range(n):
    c, t = map(int, input().split())
    if t <= l:
        ans = min(ans, c)
if ans == 1001:
    ans = "TLE"
print(ans)
Buggy python submission (verdict: Runtime Error):
# Title: close to 753
# Link: https://abc114.contest.atcoder.jp/tasks/abc114_b

import sys


sys.setrecursionlimit(10 ** 6)

read_single_str = lambda: sys.stdin.readline().strip()


def solution(s):
    return min(map(lambda x: abs(x-753), map(int, [s[i:i+3] for i in range(len(s)-2)])))


def main():
    s = read_single_str()
    print(solution(s))


if __name__ == '__main__':
    main()

Fixed submission:
# Title: Shichi-Go-San
# Link: https://abc114.contest.atcoder.jp/tasks/abc114_a

import sys


sys.setrecursionlimit(10 ** 6)

read_single_int = lambda: int(sys.stdin.readline().strip())


def solution(x: int):
    if x == 3 or x == 5 or x == 7:
        return 'YES'
    return 'NO'


def main():
    x = read_single_int()
    print(solution(x))


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
n=int(input())
if n=25:
  print('Christmas')
elif n=24:
  print('Christmas Eve')
elif n=23:
  print('Christmas Eve Eve')
elif n=22:
  print('Christmas Eve Eve Eve')

Fixed submission:
n=int(input())
if n==25:
  print('Christmas')
elif n==24:
  print('Christmas Eve')
elif n==23:
  print('Christmas Eve Eve')
elif n==22:
  print('Christmas Eve Eve Eve')
Buggy python submission (verdict: Runtime Error):
hoge=input()
hoge=hoge.split()
a=int(hoge[0])
b=int(hoge[1])
if a % 2 == 0 or b % 2 == 0:
  print("Even")
else:
  print("Odd"

Fixed submission:
hoge=input()
hoge=hoge.split()
a=int(hoge[0])
b=int(hoge[1])
if a % 2 == 0 or b % 2 == 0:
  print("Even")
else:
  print("Odd")

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

Fixed submission:
hoge=input()
hoge=hoge.split()
a=int(hoge[0])
b=int(hoge[1])
if a % 2 == 0 or b % 2 == 0:
  print("Even")
else:
  print("Odd")
Buggy python submission (verdict: Runtime Error):
N=int(input())
hoge=input()
count=0
hoge=hoge.split()
for i in range(N):
  hoge[i] = int(hoge[i])
while True:
  all_even=True
  for i in range(N):
    if hoge[i] % 2 != 0:
      all_even = False
  if all_even == False:
    break
  else:
    count += 1
    for i in range(N):
      hoge[i]=hoge[i]/2
print(count)

Fixed submission:
hoge=input()
count=0
for i in range(3):
  if hoge[i] == '1':
    count += 1
print(count)
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
c=[]
for i in range(a):
	c.append(int(input()))
c=sorted(c)
#print(c)
f=[]
for k in range(a-b+1):
	e=[]
	f.append(e)
	for i in range(b):
		e.append(c[i+k])
#print(f)
g=[]
for i in range(len(f)):
	g.append(max(f[i])-min(f[i]))
print(min(g))


Fixed submission:
a=int(input())
if a==25:
	print("Christmas")
elif a==24:
	print("Christmas Eve")
elif a==23:
	print("Christmas Eve Eve")
else:
	print("Christmas Eve Eve Eve")
Buggy python submission (verdict: Runtime Error):
a=[]
for i in range(3):
	a.append(int(input()))

if a[0]!=1:
	print(a[1]+a[2])
else:
	print("Hello World")

    

Fixed submission:
"""
a=[]
for i in range():
	a.append(int(input()))

if a[0]!=1:
	print(a[1]+a[2])
else:
	print("Hello World")
"""
a=int(input())
if a==1:
	print("Hello World")
else:
	b=int(input())
	c=int(input())
	print(b+c)

Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
if a==1:
	print("Hello World")	
else:
    print(b+c)	


Fixed submission:
"""
a=[]
for i in range():
	a.append(int(input()))

if a[0]!=1:
	print(a[1]+a[2])
else:
	print("Hello World")
"""
a=int(input())
if a==1:
	print("Hello World")
else:
	b=int(input())
	c=int(input())
	print(b+c)

Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
if a!=1:
	print(b+c)
else:
	print("Hello World")	


Fixed submission:
"""
a=[]
for i in range():
	a.append(int(input()))

if a[0]!=1:
	print(a[1]+a[2])
else:
	print("Hello World")
"""
a=int(input())
if a==1:
	print("Hello World")
else:
	b=int(input())
	c=int(input())
	print(b+c)
Buggy python submission (verdict: Runtime Error):
x = list(input())
#print(len(x))

if x[0]=="A" :
	for i in range(2,len(x)-1):
		if x[i]=="C" :
#			print(x)
			del	x[i]
			del x[0]
			y="".join(x)
			#print(y)
			if y.islower():
				print("AC")
				break
			else:
					print("WA")
else:
	print("WA")

#print(x)


Fixed submission:
x = list(input())
#print(x[])

if x[0]=="A" :
	for i in range(2, len(x)-1, 1):
		if x[i]=="C":
			#print(x)
			del	x[i]
			del x[0]
			y="".join(x)
			#print(y)
			if y.islower():
				print("AC")
				break
			else:
				print("WA")
				break
	else:
		print("WA")

else:
	print("WA")

#print(x)
Buggy python submission (verdict: Runtime Error):
# x = input()
# print(x[-1]+x[:-1])
# y = x[-1]+x[:-1]
# print(y[-1]+y[:-1])

count=0

def check():
	count=0
	for i in range(len(a[0])):
		if(a[0][i]!=a[1][i]):
			break
		if(i==int(len(a[0])-1)):
			count=1
			print("Yes")
	return count


def change():
	b=[]
	for i in range(len(a[0])-1):
		b.append(a[1][i+1])
	b.append(a[1][0])

	a[1]=b


###変数を得る
a = []
for i in range(2):
    a.append(input())



check()

if(count==0):
	for i in range(len(a[0])-1):
		change()
		count=check()

		if(count==1):
			break

if(count==0):
	print("No")


Fixed submission:
x=list(map(int,input().split()))
y=sorted(x)
#print(y)
print(abs(y[0]-y[1])+abs(y[2]-y[1]))
#print(int(x[3]-x[2]))

Buggy python submission (verdict: Runtime Error):
# x = input()
# print(x[-1]+x[:-1])
# y = x[-1]+x[:-1]
# print(y[-1]+y[:-1])

count=0

def check():
	count=0
	for i in range(len(a[0])):
		if(a[0][i]!=a[1][i]):
			break
		if(i==int(len(a[0])-1)):
			count=1
			print("Yes")
	return count


def change():
	b=[]
	for i in range(len(a[0])-1):
		b.append(a[1][i+1])
	b.append(a[1][0])

	a[1]=b


###変数を得る
a = []
for i in range(2):
    a.append(input())



check()

if(count==0):
	for i in range(len(a[0])-1):
		change()
		count=check()

		if(count==1):
			break

if(count==0):
	print("No")


Fixed submission:
x=list(map(int,input().split()))
y=sorted(x)
#print(y)
print(abs(y[0]-y[1])+abs(y[2]-y[1]))
#print(int(x[3]-x[2]))
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())

c=[]
for i in range(1,101):
	c.append(i*100**a)
if b!=100:
	print(c[b-1])
else:
	print(c[b])

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

c=[]
for i in range(1,102):
	c.append(i*100**a)
if b!=100:
	print(c[b-1])
else:
	print(c[b])

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

c=[]
for i in range(1,b+1):
	c.append(i*100**a)
if b!=100:
	print(c[b-1])
else:
	print(c[b])


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

c=[]
for i in range(1,102):
	c.append(i*100**a)
if b!=100:
	print(c[b-1])
else:
	print(c[b])

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

c=[]
for i in range(1,100):
	c.append(i*100**a)
print(c[b-1])


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

c=[]
for i in range(1,102):
	c.append(i*100**a)
if b!=100:
	print(c[b-1])
else:
	print(c[b])
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
d=[]
for i in range(a,b+1):
	d.append(i)
#print(d)
e=[]
if c<b:
	for i in range(c):
		e.append(d[i])
		e.append(d[-i-1])
else:
	for i in d:
		print(i)


e=set(e)
e=list(e)
e.sort()
for i in e:
	print(i)


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

if b-a+1>2*c:
	x=[i for i in range(a,a+c)]
	y=[i for i in range(b-c+1,b+1)]
	e=x+y
else:
	e=[i for i in range(a,b+1)]
#print(e)
for i in e:
	print(i)

Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
d=[]
for i in range(a,b+1):
	d.append(i)
#print(d)
e=[]
if c<b:
	for i in range(c):
		e.append(d[i])
		e.append(d[-i-1])
else:
	for i in d:
		print(i)
e.sort()
e=set(e)
for i in e:
	print(i)


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

if b-a+1>2*c:
	x=[i for i in range(a,a+c)]
	y=[i for i in range(b-c+1,b+1)]
	e=x+y
else:
	e=[i for i in range(a,b+1)]
#print(e)
for i in e:
	print(i)

Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
d=[]
for i in range(a,b+1):
	d.append(i)
#print(d)
e=[]
if c<b:
	for i in range(c):
		e.append(d[i])
		e.append(d[-i-1])
else:
	for i in d:
		print(i)
#print(e)
for i in sorted(set(e)):
	print(i)


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

if b-a+1>2*c:
	x=[i for i in range(a,a+c)]
	y=[i for i in range(b-c+1,b+1)]
	e=x+y
else:
	e=[i for i in range(a,b+1)]
#print(e)
for i in e:
	print(i)

Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
d=[]
for i in range(a,b+1):
	d.append(i)
#print(d)
e=[]
if c<b:
	for i in range(c):
		e.append(d[i])
		e.append(d[-i-1])
else:
	for i in d:
		print(i)
for i in sorted(set(e)):
	print(i)


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

if b-a+1>2*c:
	x=[i for i in range(a,a+c)]
	y=[i for i in range(b-c+1,b+1)]
	e=x+y
else:
	e=[i for i in range(a,b+1)]
#print(e)
for i in e:
	print(i)

Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
d=[]
for i in range(a,b+1):
	d.append(i)
#print(d)
e=[]
if c<=b:
	for i in range(c):
		e.append(d[i])
		e.append(d[-i-1])
else:
	for i in d:
		print(i)
for i in sorted(set(e)):
	print(i)


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

if b-a+1>2*c:
	x=[i for i in range(a,a+c)]
	y=[i for i in range(b-c+1,b+1)]
	e=x+y
else:
	e=[i for i in range(a,b+1)]
#print(e)
for i in e:
	print(i)
Buggy python submission (verdict: Runtime Error):
a=[int(i) for i in input()]
for i in range(len(a)-1):
	b=str(a[i])+str(a[i+1])
	int(b)
c=int(sum(a))
b=int(b)
if b%c==0:
	print("Yes")
else:
	print('No')


Fixed submission:
a=[int(i) for i in input()]
b=""
for i in range(len(a)):
	b=b+str(a[i])
	int(b)
c=int(sum(a))
b=int(b)
#print(c)
#print(b)
if b%c==0:
	print("Yes")
else:
	print('No')
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
h = [int(input()) for i in range(N)]
h.sort()
print(min(h[i+K-1] - h[i] for i in range(N-K+1)))

Fixed submission:
IN = int(input())

if IN == 25:
    print("Christmas")
elif IN == 24:
    print("Christmas Eve")
elif IN == 23:
    print("Christmas Eve Eve")
elif IN == 22:
    print("Christmas Eve Eve Eve")
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
"""
Created on Sat Apr 21 21:25:13 2018

@author: Kim
"""

IN = input().split()
A = int(IN[0])
B = int(IN[1])
C = int(IN[2])
X = int(IN[3])
Y = int(IN[4])

#そのまま買う
As = A * X
Bs = B * Y
ALLSUM = As + Bs

#ハーフをどちらかに合わせる
Cmax = 2 * max(X,Y) * C
Cmin = 2 * min(X,Y) * C

#ハーフの場合で小さい方に合わせた時の差分とその額
sabunkosuu = max(X,Y) - min(X,Y)
if X > Y:
    sabungaku = A * sabunkosuu
elif X < Y:
    sabungaku = B * sabunkosuu

#そしてそれを足した時の額
halfmin = Cmin + sabungaku 

#全部比べる
ANS = min(ALLSUM, Cmax, halfmin)
print(ANS)

Fixed submission:
# -*- coding: utf-8 -*-
"""
Created on Sat Apr 21 21:25:13 2018

@author: Kim
"""

IN = input().split()
A = int(IN[0])
B = int(IN[1])
C = int(IN[2])
X = int(IN[3])
Y = int(IN[4])

#そのまま買う
As = A * X
Bs = B * Y
ALLSUM = As + Bs

#ハーフをどちらかに合わせる
Cmax = 2 * max(X,Y) * C
Cmin = 2 * min(X,Y) * C

#ハーフの場合で小さい方に合わせた時の差分とその額
sabunkosuu = max(X,Y) - min(X,Y)
if X > Y:
    sabungaku = A * sabunkosuu
elif X < Y:
    sabungaku = B * sabunkosuu
else:
    sabungaku = 0

#そしてそれを足した時の額
halfmin = Cmin + sabungaku 

#全部比べる
ANS = min(ALLSUM, Cmax, halfmin)
print(ANS)
Buggy python submission (verdict: Runtime Error):
INP = input().split()
N = int(INP[0])
M = int(INP[N + 1])
ans = [0] * N

for i in range(N):
    for k in range(N):
        if INP[i + 1] == INP[k + 1]:
            ans[i] += 1
for i in range(N):
    for j in range(M):

        if INP[i+1] == INP[N + j + 1]:
            ans[i] -= 1

for i in range(N):
    if ans[i] < 0:
        ans[i] = 0
        
mx = max(ans)
print(mx)

Fixed submission:
N = int(input())
INPn = [input() for i in range(N)]
M = int(input())
INPm = [input() for i in range(M)]

ans = [0] * N

for i in range(N):
    for k in range(N):
        if INPn[i] == INPn[k]:
            ans[i] += 1
for i in range(N):
    for j in range(M):

        if INPn[i] == INPm[j]:
            ans[i] -= 1

for i in range(N):
    if ans[i] < 0:
        ans[i] = 0
        
mx = max(ans)
print(mx)

Buggy python submission (verdict: Runtime Error):

INP = input().split()
N = int(INP[0])
M = int(INP[N + 1])
ans = [0] * N

for i in range(N):
    for k in range(N):
        if INP[i + 1] == INP[k + 1]:
            ans[i] += 1
for i in range(N):
    for j in range(M):

        if INP[i+1] == INP[N + j + 1]:
            ans[i] -= 1
mx = max(ans)
print(mx)

Fixed submission:
N = int(input())
INPn = [input() for i in range(N)]
M = int(input())
INPm = [input() for i in range(M)]

ans = [0] * N

for i in range(N):
    for k in range(N):
        if INPn[i] == INPn[k]:
            ans[i] += 1
for i in range(N):
    for j in range(M):

        if INPn[i] == INPm[j]:
            ans[i] -= 1

for i in range(N):
    if ans[i] < 0:
        ans[i] = 0
        
mx = max(ans)
print(mx)

Buggy python submission (verdict: Runtime Error):
INP = input().split()
N = int(INP[0])
M = int(INP[N + 1])
#print(N,M)
ans = [0] * N
#print(ans)

for i in range(N):
    for k in range(N):
        if INP[i + 1] == INP[k + 1]:
            print(INP[i + 1])
            ans[i] += 1
for i in range(N):
    for j in range(M):

        if INP[i+1] == INP[N + j + 1]:
            ans[i] -= 1
mx = max(ans)
print(mx)

Fixed submission:
N = int(input())
INPn = [input() for i in range(N)]
M = int(input())
INPm = [input() for i in range(M)]

ans = [0] * N

for i in range(N):
    for k in range(N):
        if INPn[i] == INPn[k]:
            ans[i] += 1
for i in range(N):
    for j in range(M):

        if INPn[i] == INPm[j]:
            ans[i] -= 1

for i in range(N):
    if ans[i] < 0:
        ans[i] = 0
        
mx = max(ans)
print(mx)
Buggy python submission (verdict: Runtime Error):
N = int(input())

a = list(map(int,input().split())
print(abs(max(a)-min(a))
         
         

Fixed submission:
N = int(input())

a = list(map(int, input().split()))
print(abs(max(a) - min(a)))
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = int(input())

if N % 500 < A:
    return "YES"
else:
    return "NO"



Fixed submission:
N = int(input())
A = int(input())

if N % 500 <= A:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
print((a + b + 1) // 2)

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

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

print(int((a+b)/2))




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

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

return int((a+b)/2)




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

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

print(int((a+b)/2))




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

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

Fixed submission:
n = int(input())

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

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

if N == 1:
  	print("Heloo World")
  
else:
  	A = int(input())
  	B = int(input())
  print(A + B)

Fixed submission:
n = int(input())

if n == 1:
  print("Hello World")
  
else:
  a = int(input())
  b = int(input())
  print(a + b)
Buggy python submission (verdict: Runtime Error):
li = str(input).split(" ")
NT = list(map(int,li))
N = NT[0]
T = NT[1]
i = 1
mi = 9999
while i <= 3:
    a = list(map(int,input.split()))
    c = a[0]
    t = a[1]
    if t <= T and c < mi:
        mi = c
    i += 1

if mi == 9999:
    print("TLE")
else:
    print()


Fixed submission:
Input = input()
li = Input.split(" ")
NT = list(map(int,li))
N = NT[0]
T = NT[1]
i = 1
mi = 9999

while i <= N:
    Input = input()
    li = Input.split(" ")
    a = list(map(int,li))
    c = a[0]
    t = a[1]
    if t <= T and c < mi:
        mi = c
    i += 1

if mi == 9999:
    print("TLE")
else:
    print(mi)
Buggy python submission (verdict: Runtime Error):
n, i = map(int,input().aplit())

print(n - i + 1)

Fixed submission:
n, i = map(int,input().split())
print(n-i+1)
Buggy python submission (verdict: Runtime Error):
n, k = map(int,input().split())
x = list(map(int,input().split()))
time = 10**9

for i in range(n - k + 1):
    x_k = [ x[i], x_k[i+k-1] ]
    #print(x_k)
    
    if x_k[0] >= 0:
        t = x_k[1]
            
    elif x_k[1] <= 0:
        t = -x_k[0]
    
    else:
        t = min(-x_k[0] + x_k[1] *2,-x_k[0] * 2 + x_k[1])

    time = min(t, time)
    
print(time)


Fixed submission:
nk = list(map(int, input().split()))
n = nk[0]
k = nk[1]
x = list(map(int, input().split()))
min_d = 10 ** 9
for i in range(n - k + 1):
    max_i = x[i + k - 1]
    min_i = x[i]
    if max_i <= 0:
        min_d_i = - min_i
    elif min_i >= 0:
        min_d_i = max_i
    else:
        min_d_i = min(- min_i + 2 * max_i, -2 * min_i + max_i)
    if min_d_i < min_d:
            min_d = min_d_i
print(min_d)

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int,input().split())
x = list(map(int,input().split()))
time = 10**9

for i in range(n - k + 1):
    x_k = x[i:i+k]
    #print(x_k)
    
    if x_k[0] >= 0:
        t = x_k[-1]
            
    elif x_k[-1] <= 0:
        t = -x_k[0]
    
    else:
        t = min(-x_k[0] + x_k[-1] *2,-x_k[0] * 2 + x_k[-1])

    time = min(t, time)
    
print(time)


Fixed submission:
nk = list(map(int, input().split()))
n = nk[0]
k = nk[1]
x = list(map(int, input().split()))
min_d = 10 ** 9
for i in range(n - k + 1):
    max_i = x[i + k - 1]
    min_i = x[i]
    if max_i <= 0:
        min_d_i = - min_i
    elif min_i >= 0:
        min_d_i = max_i
    else:
        min_d_i = min(- min_i + 2 * max_i, -2 * min_i + max_i)
    if min_d_i < min_d:
            min_d = min_d_i
print(min_d)

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int,input().split())
x = list(map(int,input().split()))
time = 10**9

for i in range(n - k + 1):
    x_k = x[i:i+k]
    #print(x_k)
    
    if x_k[0] >= 0:
        t = x_k[-1]
            
    elif x_k[-1] <= 0:
        t = -x_k[0]
    
    elif -x_k[0] <= x_k[-1]:
        t = -x_k[0] * 2 + x_k[-1]
    
    else:
        t = -x_k[0] + x_k[-1] *2

    time = min(t, time)
    
print(time)


Fixed submission:
nk = list(map(int, input().split()))
n = nk[0]
k = nk[1]
x = list(map(int, input().split()))
min_d = 10 ** 9
for i in range(n - k + 1):
    max_i = x[i + k - 1]
    min_i = x[i]
    if max_i <= 0:
        min_d_i = - min_i
    elif min_i >= 0:
        min_d_i = max_i
    else:
        min_d_i = min(- min_i + 2 * max_i, -2 * min_i + max_i)
    if min_d_i < min_d:
            min_d = min_d_i
print(min_d)
Buggy python submission (verdict: Runtime Error):
N, X = map(int, input().split())

a, p = [1], [1]

for i in range(N):
	a.append(a[i] * 2 + 3)
	p.append(p[i] * 2 + 1)
def f(N, X): # X <= 0 や X > a_N を許容し解説本文から簡略化
	if N == 0:
		return 0 if X <= 0 else 1
	elif X <= 1 + a[N-1]:
		return f(N-1, X-1)
	else:
		return p[N-1] + 1 + f(N-1, X-2-a[N-1])

 print(f(N, X))


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

a,p = [1],[1]

#バーガーの厚みとパティの総数を求める

for i in range(n):
    a.append(2 * a[i] + 3)
    p.append(2 * p[i] + 1)

def f(N,X):
    if N == 0:
        if X <= 0:
            return 0

        else:
            return 1

    elif X <= 1 + a[N-1]:
        return f(N -1,X-1)

    else:#if X <= 2 + 2 * a[N-1]:
        return p[N-1] + 1 + f(N -1, X-2-a[N-1])

print(f(n,x))