Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
a=input()
b=input()
c=input()
w=[a,b,c]
e=w.count('5')
if '5' and '7' not in w:
    print ('NO')
elif e==2:
    print ('YES')
else:
    print ('NO')

Fixed submission:
a,b,c=input().split()
w=[a,b,c]
e=w.count('5')
if '5' and '7' not in w:
    print ('NO')
elif e==2:
    print ('YES')
else:
    print ('NO')

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

def solve(a, b, c):
    # Uncomment the following if you want to check the input.
    # print('a =', a)
    # print('b =', b)
    # print('c =', c)
    def I(a,b,c):
    w=[a,b,c]
    if 5 and 7 not in w:
        print ('NO')
    e=w.count(5)
    if e==2:
        print ('YES')
    else:
        print ('NO')


def readQuestion():
    ws = sys.stdin.readline().strip().split()
    a = int(ws[0])
    b = int(ws[1])
    c = int(ws[2])
    return (a, b, c,)

def main():
    solve(*readQuestion())

# Uncomment before submission
    main()

Fixed submission:
a,b,c=input().split()
w=[a,b,c]
e=w.count('5')
if '5' and '7' not in w:
    print ('NO')
elif e==2:
    print ('YES')
else:
    print ('NO')

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

def solve(a, b, c):
    # Uncomment the following if you want to check the input.
    # print('a =', a)
    # print('b =', b)
    # print('c =', c)
    w=[a,b,c]
    if 5 and 7 not in w:
        return ('NO')
    e=w.count(5)
    if e==2:
        return ('YES')
    else:
        return ('NO')


def readQuestion():
    ws = sys.stdin.readline().strip().split()
    a = int(ws[0])
    b = int(ws[1])
    c = int(ws[2])
    return (a, b, c,)

def main():
    solve(*readQuestion())

# Uncomment before submission
	main()

Fixed submission:
a,b,c=input().split()
w=[a,b,c]
e=w.count('5')
if '5' and '7' not in w:
    print ('NO')
elif e==2:
    print ('YES')
else:
    print ('NO')

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

def solve(a, b, c):
    # Uncomment the following if you want to check the input.
    # print('a =', a)
    # print('b =', b)
    # print('c =', c)
    w=[a,b,c]
    if 5 and 7 not in w:
        return ('NO')
    e=w.count(5)
    if e==2:
        return ('YES')
    else:
        return ('NO')


def readQuestion():
    ws = sys.stdin.readline().strip().split()
    a = int(ws[0])
    b = int(ws[1])
    c = int(ws[2])
    return (a, b, c,)

def main():
    solve(*readQuestion())

# Uncomment before submission
 main()

Fixed submission:
a,b,c=input().split()
w=[a,b,c]
e=w.count('5')
if '5' and '7' not in w:
    print ('NO')
elif e==2:
    print ('YES')
else:
    print ('NO')
Buggy python submission (verdict: Runtime Error):
s = input()
if s.endwith('s'):
	print(s + 'es')
else:
	print(s + 's')

Fixed submission:
s = input()
if s.endswith('s'):
  print(s + 'es')
else:
  print(s + 's')
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
k = int(input())
i = 0

if k > 1:
  for t in range(1, k):
    if a<b*2*t and b*2*t<c*2*(k-t):
      i += 1
    elif a<b and b<c*2*k:
      i += 1
    elif a<b*2*k and b*2*k<C:
      i += 1
    else:
      i += 0
    t += 1
elif k == 1:
  if a<b*2 and b*2<c:
    i = 1
  elif a<b and b<c*2:
    i = 1
  else:
    i = 0
  
if i > 0:
  print('Yes')
elif i == 0:
  print('No')

Fixed submission:
x = int(input())
if x >= 400 and x <= 599:
  print(8)
elif x >= 600 and x <= 799:
  print(7)
elif x >= 800 and x <= 999:
  print(6)
elif x >= 1000 and x <= 1199:
  print(5)
elif x >= 1200 and x <= 1399:
  print(4)
elif x >= 1400 and x <= 1599:
  print(3)
elif x >= 1600 and x <= 1799:
  print(2)
elif x >= 1800 and x <= 1999:
  print(1)
Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
li = list(input().split())

j = 0
i = 0

while i <= k-1:
  j += int(new_list[i])
  i += 1

print(j)

Fixed submission:
alpha = input()

if alpha.isupper():
  print('A')
elif alpha.islower():
  print('a')

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

new_list = sorted(li)

j = 0
i = 0

while i <= k-1:
  j += int(new_list[i])
  i += 1

print(j)

Fixed submission:
alpha = input()

if alpha.isupper():
  print('A')
elif alpha.islower():
  print('a')

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

new_list = sorted(list)

print(new_list)

j = 0
i = 0

while i <= k-1:
  j += int(new_list[i])
  i += 1

print(j)

Fixed submission:
alpha = input()

if alpha.isupper():
  print('A')
elif alpha.islower():
  print('a')

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

new_list = sorted(list)

j = 0
i = 0

while i <= k-1:
  j += int(new_list[i])
  i += 1

print(j)

Fixed submission:
alpha = input()

if alpha.isupper():
  print('A')
elif alpha.islower():
  print('a')
Buggy python submission (verdict: Runtime Error):
if s[-1] == 's':      
    s += 'es'                                                                                                 
else:      
    s += 's'      
print(s) 

Fixed submission:
s = input()                                                                                                   
if s[-1] == 's':
    s += 'es'
else:
    s += 's'      
print(s)
Buggy python submission (verdict: Runtime Error):
if X >= 30:
  print("Yes")
else:
  print("No")

Fixed submission:
X = int(input())
if X >= 30:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
if x <= 30:
  print("No")
else:
  print("Yes")

Fixed submission:
X = int(input())
if X >= 30:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
a = int(input("Input an integer : "))
n1 = int( "%s" % a )
n2 = int( "%s%s" % (a,a) )
n3 = int( "%s%s%s" % (a,a,a) )
print (n1+n2+n3

Fixed submission:
a = int(input())
n1 = int(pow(a,1))
n2 = int(pow(a,2))
n3 = int(pow(a,3))
print (n1+n2+n3)

Buggy python submission (verdict: Runtime Error):
a = input()
print(pow(a,1)+pow(a,2)+pow(a,3))

Fixed submission:
a = int(input())
n1 = int(pow(a,1))
n2 = int(pow(a,2))
n3 = int(pow(a,3))
print (n1+n2+n3)
Buggy python submission (verdict: Runtime Error):
d,t,s = map(int, input().split())
if t <= d/s:
  print('Yes')
 else:
  print('No')

Fixed submission:
d,t,s = map(int, input().split())
if d/s <= t:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
print(A * B)

Fixed submission:
A, B = map(int, input().split())
print(A * B)
Buggy python submission (verdict: Time Limit Exceeded):
def resolve():
	N = int(input())
	A = list(map(int, input().split()))
	res = 0
	v = 10**9+7
	for i in range(N-1):
		res += A[i] * sum(A[i+1:])
	print(res%v)
resolve()


Fixed submission:
def resolve():
	N = int(input())
	A = list(map(int, input().split()))
	S = sum(A)
	res = 0
	v = 10**9+7
	for i in range(N-1):
		S -= A[i]
		res += A[i] * S
	print(res%v)
resolve()
Buggy python submission (verdict: Runtime Error):
def resolve():
	X, N = map(int, input().split())
	if N == 0:
		print(X)
	else:
		A = list(map(int, input().split()))
		ymin = min(min(A), X)-1
		ymax = max(max(A), X)
		Y = {}
		for y in range(ymin, ymax):
			if y in A:
				None
			else:
				key = int(abs(X-y))
				if key in Y.keys():
					Y[key] = Y[key].append(y)
				else:
					Y[key] = [y]
		key = min(Y.keys())
		print(min(Y[key]))
resolve()

Fixed submission:
def resolve():
	X, N = map(int, input().split())
	if N == 0:
		print(X)
	else:
		A = list(map(int, input().split()))

		for i in range(100):
			Y = X-i
			if Y not in A:
				print(Y)
				break
			Y = X+i
			if Y not in A:
				print(Y)
				break
resolve()
Buggy python submission (verdict: Time Limit Exceeded):
def resolve():
	_ = int(input())
	A = sorted(list(map(int, input().split())))
	Y = 0
	while True:
		a = A[0]
		A = A[1:]
		if not a in A:
			Y+=1
		A = list(filter(lambda x: x%a>0, A))
		if len(A)<2:
			break
	print(Y+len(A))
resolve()

Fixed submission:
from collections import defaultdict

def resolve():
	N = int(input())
	A = list(map(int, input().split()))
	a_max = max(A)+1
	B = defaultdict(int)
	for i in range(N):
		a = A[i]
		if B[a]>1:
			B[a] = 2
		else:
			for j in range(a, a_max, a):
				B[j] += 1
	Y = 0
	for a in A:
		if B[a]==1:
			Y+=1
	print(Y)
resolve()
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = input().split()
cutoff = 10**18
res = 1
for n in range(N):
	res *= int(A[n])
if res > cutoff:
	res = '-1'
print(res)

Fixed submission:
N = int(input())
A = input().split()
if '0' in A:
	print(0)
else:
	cutoff = 10**18
	res = 1
	for n in range(N):
		res *= int(A[n])
		if res > cutoff:
			res = '-1'
			break
	print(res)
Buggy python submission (verdict: Runtime Error):
A, B = map(float, input().split())
res = math.floor(A*B)
print(res)

Fixed submission:
A, B = input().split()
A = int(A)
B = B.split('.')
B = int(B[0])*100 + int(B[1])
res = '{:d}'.format(A*B)[:-2]
if res == '':
	print('0')
else:
	print(res)
Buggy python submission (verdict: Runtime Error):
ef D(argN = None):
	answer = 0
	N = argN or int(input())
	if N==1:
		print(answer)
	else:
		# 素因数pを見つける。範囲は2から√Nまででよい。
		for p in range(2, int(N**0.5)+2):
			e = 0
			while (N % p == 0):
				N /= p
				e += 1
			# z=p**eが見つかった
			if e>0:
				# eを1, 2, 3, 4...に分けられる回数カウント
				for i in range(1, e+1):
					if e >= 1:
						e -= i
						answer += 1
		# もし素因数が見つからなかった場合、N自身を素数ととらえて1回カウント
		if answer==0:
			answer = 1
		print(answer)
        
D()

Fixed submission:
def resolve():
	answer = 0
	N = int(input())
	if N==1:
		print(answer)
	else:
		# 素因数pを見つける。範囲は2から√Nまででよい。
		for p in range(2, int(N**0.5)+2):
			e = 0
			while (N % p == 0):
				N /= p
				e += 1
			# z=p**eが見つかった
			if e>0:
				# eを1, 2, 3, 4...に分けられる回数カウント
				for i in range(1, e+1):
					if e >= i:
						e -= i
						answer += 1
		# √Nまでで割り切れなかった場合、N自身が素数
		if N!=1:
			answer += 1
		print(answer)
        
resolve()
Buggy python submission (verdict: Runtime Error):
S, W = map(lambda x: int(x), input().split())
if S > W:
  print('safe')
  else:
    print('unsafe')

Fixed submission:
S, W = map(lambda x: int(x), input().split())
if S > W:
  print('safe')
else:
  print('unsafe')

Buggy python submission (verdict: Runtime Error):
S, W = map(lambda: x, input().split())
if S>W:
  print('safe')
else:
  print('unsafe')

Fixed submission:
S, W = map(lambda x: int(x), input().split())
if S > W:
  print('safe')
else:
  print('unsafe')
Buggy python submission (verdict: Runtime Error):
A, B, C, D = map(lambda x: int(x), input().split())
while true:
  C -= B
  if C < 1:
    print('Yes')
    break
    A -= D
    if A < 1:
      print('No')

Fixed submission:
A, B, C, D = map(lambda x: int(x), input().split())
while True:
	C -= B
	if C < 1:
		print('Yes')
		break
	A -= D
	if A < 1:
		print('No')
		break
Buggy python submission (verdict: Runtime Error):
import math
A, B = [int(x) for x in input().split()]
lcm = (A * B) // math.gcd(A, B)
print(lcm)

Fixed submission:
import fractions
A, B = [int(x) for x in input().split()]
lcm = (A * B) // fractions.gcd(A, B)
print(lcm)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = [int(x) for x in input().split()]
# a = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3]

target = 1
res = 0
flag = False

for i in range(N):
	x = a.pop(0)
	if x == target:
		target += 1
		flag = True
	else:
		res += 1

if flag:
	print(res)
else:
	print(-1)

Fixed submission:
N = int(input())
a = [int(x) for x in input().split()]
# a = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3]

target = 1
res = 0
flag = False

for x in a:
	if x == target:
		target += 1
		flag = True
	else:
		res += 1

if flag:
	print(res)
else:
	print(-1)

Buggy python submission (verdict: Runtime Error):
N = int(input())
a = [int(x) for x in input().split()]

def brickblock(lst, flag=False, target=1, res=0):
	if not lst:
		if flag:
			return res
		else:
			return -1
	elif lst[0] == target:
		return brickblock(lst[1:], True, target+1, res)
	else:
		return brickblock(lst[1:], flag, target, res+1)

res = brickblock(a)
print(res)

Fixed submission:
N = int(input())
a = [int(x) for x in input().split()]
# a = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3]

target = 1
res = 0
flag = False

for x in a:
	if x == target:
		target += 1
		flag = True
	else:
		res += 1

if flag:
	print(res)
else:
	print(-1)

Buggy python submission (verdict: Runtime Error):
N = int(input())
a = [int(x) for x in input().split()]

def brickblock(lst, acm=[], target=1, res=0):
	if len(lst) < 1:
		if len(acm)>0:
			return res
		else:
			return -1
	elif lst[0] == target:
		return brickblock(lst[1:], acm+[target], target+1, res)
	else:
		return brickblock(lst[1:], acm, target, res+1)

res = brickblock(a)
print(res)

Fixed submission:
N = int(input())
a = [int(x) for x in input().split()]
# a = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3]

target = 1
res = 0
flag = False

for x in a:
	if x == target:
		target += 1
		flag = True
	else:
		res += 1

if flag:
	print(res)
else:
	print(-1)
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
def resolve():
	# N: 品物の個数、W: 容量の上限
	N, W = map(int, input().split())
	# DP配列の宣言: DP[N][W]
	dp = np.empty((N+1, W+1), dtype=np.int64)
	# DP配列の初期化
	dp[0,:] = 0
	for i in range(N):
		w_n, v_n = map(int, input().split())
		dp[i+1, :w_n] = dp[i, :w_n]
		for j in range(w_n, W+1):
			dp[i+1, j] = max(
				dp[i, j-w_n]+v_n,	# バッグに入れた時の価値
				dp[i, j]			# バッグにいれない時の価値
			)
	print(dp[N, W])
resolve()

Fixed submission:
import numpy as np
def resolve():
	# N: 品物の個数、W: 容量の上限
	N, W = map(int, input().split())
	# DP配列の宣言: DP[N][W]
	dp = np.empty((N+1, W+1), dtype=np.int64)
	# DP配列の初期化
	dp[0,:] = 0
	for i in range(N):
		w_n, v_n = map(int, input().split())
		dp[i+1, :w_n] = dp[i, :w_n]
		dp[i+1, w_n:] = np.maximum(
			dp[i, w_n:],
			dp[i, :(W+1-w_n)] + v_n
		)
	print(dp[N, W])
resolve()

Buggy python submission (verdict: Time Limit Exceeded):
def resolve():
	# N: 品物の個数、W: 容量の上限
	N, W = map(int, input().split())
	# DP配列の宣言: DP[N][W] = 0
	dp = [[0] * (W+1) for _ in range(N+1)]
	for i in range(N):
		w_n, v_n = map(int, input().split())
		for j in range(w_n):
			dp[i+1][j] = dp[i][j]
		for j in range(w_n, W+1):
			dp[i+1][j] = max(
				dp[i][j-w_n]+v_n,	# バッグに入れた時の価値
				dp[i][j]			# バッグにいれない時の価値
			)
	print(dp[N][W])
resolve()

Fixed submission:
import numpy as np
def resolve():
	# N: 品物の個数、W: 容量の上限
	N, W = map(int, input().split())
	# DP配列の宣言: DP[N][W]
	dp = np.empty((N+1, W+1), dtype=np.int64)
	# DP配列の初期化
	dp[0,:] = 0
	for i in range(N):
		w_n, v_n = map(int, input().split())
		dp[i+1, :w_n] = dp[i, :w_n]
		dp[i+1, w_n:] = np.maximum(
			dp[i, w_n:],
			dp[i, :(W+1-w_n)] + v_n
		)
	print(dp[N, W])
resolve()

Buggy python submission (verdict: Time Limit Exceeded):
def resolve():
	# DP[i+1][j]: i=品物[0:i]の中から, j: 合計jを超えない範囲で選んだ品物の, value=価値の総和の最大値
	# DP[0][j] = 0
	# DP[i+1][j] = DP[i][j] (if j < w_n)
	# DP[i+1][j] = max( DP[i][j], DP[i][j-w_n] + v_n )

	# N: 品物の個数、W: 容量の上限
	N, W = map(int, input().split())
	# print(f'N={N}, W={W}', file=sys.stderr)
	# DP配列の宣言
	dp = [[0] * (W+1) for _ in range(N+1)]
	# print(f'DP.shape=', np.array(dp).shape, file=sys.stderr)
	# DP初期化: dp[0][w] = 0 -> 済み
	# i = 商品番号
	for i in range(N):
		# w_n: 品物[n]の重さ, v_n: 品物[n]の価値
		w_n, v_n = map(int, input().split())
		# j = バッグに入る残り容量
		for j in range(1, W+1):
			# print(f'{i},{j},{w_n},{v_n}', file=sys.stderr)
			# バッグに入る残り容量が品物[i]の重さw_nより大きい場合
			if j >= w_n:
				dp[i+1][j] = max(
					dp[i][j-w_n]+v_n,	# バッグに入れた時の価値
					dp[i][j]			# バッグにいれない時の価値
				)
			else:
				dp[i+1][j] = dp[i][j]	# バッグに入れない
	# 価値の最大値を出力
	print(dp[N][W])
resolve()

Fixed submission:
import numpy as np
def resolve():
	# N: 品物の個数、W: 容量の上限
	N, W = map(int, input().split())
	# DP配列の宣言: DP[N][W]
	dp = np.empty((N+1, W+1), dtype=np.int64)
	# DP配列の初期化
	dp[0,:] = 0
	for i in range(N):
		w_n, v_n = map(int, input().split())
		dp[i+1, :w_n] = dp[i, :w_n]
		dp[i+1, w_n:] = np.maximum(
			dp[i, w_n:],
			dp[i, :(W+1-w_n)] + v_n
		)
	print(dp[N, W])
resolve()
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))

ans = 0
b = []
c = 0

for i in range(n-1,0,-1):
    c = c + a[i]
    b.insert(0,c)

b.insert(0,0)

for j in range(n-1):
    ans = (a[j] * b[j+1] + ans) % (10**9+7)

print(ans)


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

ans = 0
b = [0] * n
c = 0

for i in range(n):
    c = c + a[i]
    b[i] = c

for j in range(n-1):
    ans = (a[j] * (b[n-1] - b[j]) + ans) % (10**9+7)

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))

ans = 0

for i in range(n-1):
    for j in range(i+1,n):
        ans = (a[i] * a[j] + ans) % (10**9+7)

print(ans)


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

ans = 0
b = [0] * n
c = 0

for i in range(n):
    c = c + a[i]
    b[i] = c

for j in range(n-1):
    ans = (a[j] * (b[n-1] - b[j]) + ans) % (10**9+7)

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))
q = int(input())

g = []
t = sum(a)
s = []

for j in range(100001):
    h = a.count(j)
    g.append(h)

for i in range(q):
    b,c = map(int,input().split())
    if g[b] != 0:
        t = t + c*g[b] - b*g[b]
        g[c] = g[c] + g[b]
        g[b] = 0
        s.append(t)
    else:
        s.append(t)

for m in range(q):
    print(s[m])


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

g = [0]*(10**5+1)
t = sum(a)
s = []

for aj in a:
    g[aj]+=1

for i in range(q):
    b,c = map(int,input().split())
    if g[b] != 0:
        t = t + c*g[b] - b*g[b]
        g[c] = g[c] + g[b]
        g[b] = 0
        s.append(t)
    else:
        s.append(t)

for m in range(q):
    print(s[m])
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))

m = n + 1
s = 0

for i in range(1,m):
    c = a.count(i)
    if c > 0:
        a.remove(i)
        print(c)
    else:
        print('0')


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

s = [0]*(n)

for i in range(n-1):
    s[a[i]-1] = s[a[i]-1] + 1
    
for j in range(n):
    print(s[j])

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))

m = n + 1
s = 0

for i in range(1,m):
    c = a.count(i)
    if c > 0:
        a.remove(i)
        print(c)
    else:
        print('0')


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

s = [0]*(n)

for i in range(n-1):
    s[a[i]-1] = s[a[i]-1] + 1
    
for j in range(n):
    print(s[j])

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))

m = n + 1
s = 0

for i in range(1,m):
    if s < n:
        c = a.count(i)
        s = s + c
        print(c)
    elif s >= n:
        print('0')


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

s = [0]*(n)

for i in range(n-1):
    s[a[i]-1] = s[a[i]-1] + 1
    
for j in range(n):
    print(s[j])

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))

m = n + 1

for i in range(1,m):
    c = a.count(i)
    print(c)


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

s = [0]*(n)

for i in range(n-1):
    s[a[i]-1] = s[a[i]-1] + 1
    
for j in range(n):
    print(s[j])
Buggy python submission (verdict: Time Limit Exceeded):
import math

from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

k = int(input())
s = 0
c = 0

for a in range(1,k+1):
    for b in range(1,k+1):
        for c in range(1,k+1):
            d = gcd(a,b,c)
            s = s + d

print(s)

Fixed submission:
k = int(input())
a = [1, 9, 30, 76, 141, 267, 400, 624, 885, 1249, 1590, 2208, 2689, 3411, 4248, 5248, 6081, 7485, 8530, 10248, 11889, 13687, 15228, 17988, 20053, 22569, 25242, 28588, 31053, 35463, 38284, 42540, 46581, 50893, 55362, 61824, 65857, 71247, 76884, 84388, 89349, 97881, 103342, 111528, 120141, 128047, 134580, 146316, 154177, 164817, 174438, 185836, 194157, 207927, 218812, 233268, 245277, 257857, 268182, 288216, 299257, 313635, 330204, 347836, 362973, 383709, 397042, 416448, 434025, 456967, 471948, 499740, 515581, 536073, 559758, 583960, 604833, 633651, 652216, 683712, 709065, 734233, 754734, 793188, 818917, 846603, 874512, 909496, 933081, 977145, 1006126, 1041504, 1073385, 1106467, 1138536, 1187112, 1215145, 1255101, 1295142, 1342852, 1373253, 1422195, 1453816, 1502376, 1553361, 1595437, 1629570, 1691292, 1726717, 1782111, 1827492, 1887772, 1925853, 1986837, 2033674, 2089776, 2145333, 2197483, 2246640, 2332104, 2379085, 2434833, 2490534, 2554600, 2609625, 2693919, 2742052, 2813988, 2875245, 2952085, 3003306, 3096024, 3157249, 3224511, 3306240, 3388576, 3444609, 3533637, 3591322, 3693924, 3767085, 3842623, 3912324, 4027884, 4102093, 4181949, 4270422, 4361548, 4427853, 4548003, 4616104, 4718640, 4812789, 4918561, 5003286, 5131848, 5205481, 5299011, 5392008, 5521384, 5610705, 5739009, 5818390, 5930196, 6052893, 6156139, 6239472, 6402720, 6493681, 6623853, 6741078, 6864016, 6953457, 7094451, 7215016, 7359936, 7475145, 7593865, 7689630, 7886244, 7984165, 8130747, 8253888, 8403448, 8523897, 8684853, 8802826, 8949612, 9105537, 9267595, 9376656, 9574704, 9686065, 9827097, 9997134, 10174780, 10290813, 10493367, 10611772, 10813692]

s = a[k-1]

print(s)
Buggy python submission (verdict: Runtime Error):
a = x // 500
b = (x % 500)//5

s = a * 1000 + b * 5

print(s)


Fixed submission:
x = int(input())

a = x // 500
b = (x % 500)//5

s = a * 1000 + b * 5

print(s)
Buggy python submission (verdict: Time Limit Exceeded):
s = input()
q = int(input())
v = 0

for i in range(q):
    t = input().split()
    if t[0] == '1':
        v = v + 1
    elif t[0] == '2':
        if (t[1] == '1') and (v % 2 == 0):
            s = t[2]+s
        elif (t[1] == '1') and (v % 2 == 1):
            s = s + t[2]
        elif (t[1] == '2') and (v % 2 == 0):
            s = s + t[2]
        elif (t[1] == '2') and (v % 2 == 1):
            s = t[2]+s

if v % 2 == 1:
    s = s[::-1]            
            
print (s)


Fixed submission:
s = input()
q = int(input())
v = 0
fs = ''
rs = ''

for i in range(q):
    t = input().split()
    if t[0] == '1':
        v = v + 1
    elif t[0] == '2':
        if (t[1] == '1') and (v % 2 == 0):
            fs = t[2]+fs
        elif (t[1] == '1') and (v % 2 == 1):
            rs = rs + t[2]
        elif (t[1] == '2') and (v % 2 == 0):
            rs = rs + t[2]
        elif (t[1] == '2') and (v % 2 == 1):
            fs = t[2]+fs

if v % 2 == 0:
    s = fs + s + rs
else:
    s = fs + s + rs
    s = s[::-1]        
            
print (s)

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
q = int(input())

for i in range(q):
    t = input().split()
    if t[0] == '1':
        s = s[::-1]
    elif t[0] == '2':
        if t[1] == '1':
            s = t[2]+s
        elif t[1] == '2':
            s = s + t[2]

print (s)


Fixed submission:
s = input()
q = int(input())
v = 0
fs = ''
rs = ''

for i in range(q):
    t = input().split()
    if t[0] == '1':
        v = v + 1
    elif t[0] == '2':
        if (t[1] == '1') and (v % 2 == 0):
            fs = t[2]+fs
        elif (t[1] == '1') and (v % 2 == 1):
            rs = rs + t[2]
        elif (t[1] == '2') and (v % 2 == 0):
            rs = rs + t[2]
        elif (t[1] == '2') and (v % 2 == 1):
            fs = t[2]+fs

if v % 2 == 0:
    s = fs + s + rs
else:
    s = fs + s + rs
    s = s[::-1]        
            
print (s)
Buggy python submission (verdict: Runtime Error):
n = int(input())

s = []
t = []

for i in range(n):
    s.append(input())

s.sort()

for j in range(n):
    t.append(s.count(s[j]))

u = max(t)

st = 0

for k in range(n):
    if s.count(s[k]) == u and st != s[k]:
        print (s[k])
        st = s[k]


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

p.sort()

if p[0]==p[1]:
    if p[1]==p[2]:
        print('No')
    else:
        print('Yes')
elif p[1]==p[2]:
    print('Yes')
else:
    print('No')