Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
print(a * b // 2))

Fixed submission:
a, b, c = map(int, input().split())
print(int(a * b / 2))
Buggy python submission (verdict: Time Limit Exceeded):
a, b, x = map(int, input().split())

ans = 0
for i in range(a, b + 1):
  if i % x == 0:
    ans += 1

print(ans)

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

print((b//x+1)-((a-1)//x+1))
Buggy python submission (verdict: Time Limit Exceeded):
import sys
N = int(input())
num_list = list(map(int, input().split()))
c = 1
for i in range(N):
        c = c * num_list[i]

if c <= 10 ** 18:
    print(c)
else:
    print(-1)

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

if 0 in A:
  ans = 0
  N = 0

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

print(ans)

Buggy python submission (verdict: Runtime Error):
import sys
N = int(input())
num_list = list(map(int, input().split()))
c = 1
if 0 in num_list:
    print(0)
    sys.exit(1)
    
for i in range(N):
        c = c * num_list[i]

if c <= 10 ** 18:
    print(c)
else:
    print(-1)

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

if 0 in A:
  ans = 0
  N = 0

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

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
num_list = list(map(int, input().split()))
for i in range(N):
    if i == 0:
        c = num_list[i]
    else:
        c = c * num_list[i]

if c <= 10 ** 18:
    print(c)
else:
    print(-1)

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

if 0 in A:
  ans = 0
  N = 0

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

print(ans)
Buggy python submission (verdict: Runtime Error):
N = input()
if N[-1] == 3
    print("bon")
elif N[-1] == 0 or 1 or 6 or 8:
    print("pon")
else:
    print("hon")

Fixed submission:
N = input()
if N[-1] == "3":
    print("bon")
elif N[-1] == "0":
    print("pon")
elif N[-1] == "1":
    print("pon")
elif N[-1] == "6":
    print("pon")
elif N[-1] == "8":
    print("pon")
elif N[-1] == "2":
    print("hon")
elif N[-1] == "4":
    print("hon")
elif N[-1] == "5":
    print("hon")
elif N[-1] == "7":
    print("hon")
elif N[-1] == "9":
    print("hon")
Buggy python submission (verdict: Runtime Error):
a,b,c = map(int,input().split())
counter = 0
if a ==1:
    counter += 1
if b ==1:
    counter += 1
if c ==1:
    counter += 1

print(counter)

Fixed submission:
print(input().count("1"))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
A = list(map(int, input().split()))
result = 1

for number in A:
  result *= number
  if (result == 0):
    print(0)
    break

if (result > 10 ** 18):
  print(-1)
elif (result != 0):
  print(result)

Fixed submission:
n = int(input())
A = list(map(int, input().split()))
result = 1

if 0 in A:
  print(0)
else:
  for number in A:
    result *= number
    if (result > 10 ** 18):
      print(-1)
      break
  else:
    print(result)

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

for number in A:
  result *= number

if (result > 10 ** 18):
  print(-1)
else:
  print(result)


Fixed submission:
n = int(input())
A = list(map(int, input().split()))
result = 1

if 0 in A:
  print(0)
else:
  for number in A:
    result *= number
    if (result > 10 ** 18):
      print(-1)
      break
  else:
    print(result)
Buggy python submission (verdict: Runtime Error):
K = int(input())
S = input()
if len(S) <= K:
  print(S)
else:
  l = S.split()
  for i in range(len(S)-K):
    l.pop(-1)
  print(''.join(l))


Fixed submission:
K = int(input())
S = input()

if len(S) <= K:
  print(S)
else:
  print(S[:K]+'...')

Buggy python submission (verdict: Runtime Error):
K = int(input())
S = input()
if len(S) <= K:
  print(S)
else:
  l = S.split()
  l.pop(K:)
  print(''.join(l))

Fixed submission:
K = int(input())
S = input()

if len(S) <= K:
  print(S)
else:
  print(S[:K]+'...')
Buggy python submission (verdict: Runtime Error):
K = int(input())
k = K
A,B = map(int, input().split())
for i in range(1, B+1):
    k *= i
    if k > A and k < B:
        print('OK')
        a = True
        break
    else:
        k = K
        continue
if a != True:
    print('NG')

Fixed submission:
K = int(input())
k = K
A,B = map(int, input().split())
for i in range(1, B+1):
    k *= i
    if k >= A and k <= B:
        print('OK')
        a = True
        break
    else:
        k = K
        a = False
        continue
if a != True:
    print('NG')

Buggy python submission (verdict: Runtime Error):
K = int(input())
k = K
A,B = map(int, input().split())
for i in range(1, B+1):
    k *= i
    if k > a and k < b:
        print('OK')
        a = True
        break
if not a:
    print('NG')


Fixed submission:
K = int(input())
k = K
A,B = map(int, input().split())
for i in range(1, B+1):
    k *= i
    if k >= A and k <= B:
        print('OK')
        a = True
        break
    else:
        k = K
        a = False
        continue
if a != True:
    print('NG')

Buggy python submission (verdict: Runtime Error):
K = int(input())
A = int(input())
B = int(input())
if B-A > K:
    print('OK')
else:
    print('NG')

Fixed submission:
K = int(input())
k = K
A,B = map(int, input().split())
for i in range(1, B+1):
    k *= i
    if k >= A and k <= B:
        print('OK')
        a = True
        break
    else:
        k = K
        a = False
        continue
if a != True:
    print('NG')
Buggy python submission (verdict: Runtime Error):
K = int(input())
k = K
A,B = map(int, input().split())
for i in range(1, B+1):
    k *= i
    if k > a and k < b:
        print('OK')
        a = True
        break
if not a:
    print('NG')


Fixed submission:
t_have = 100
t_need_achieve = int(input())
count_year = 0
while t_have < t_need_achieve:
    t_have += t_have // 100
    count_year += 1
print(count_year)
Buggy python submission (verdict: Runtime Error):
S = int(input())
W = int(input())
if W >= S:
  print('unsafe')
else:
  print('safe')

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

Buggy python submission (verdict: Runtime Error):
S = int(input())
W = int(input())
if W >= S:
	print('unsafe')
else:
	print('safe')

Fixed submission:
S,W = map(int, input().split())
if W >= S:
	print('unsafe')
else:
	print('safe')
Buggy python submission (verdict: Runtime Error):
from math import inf
A,B,C,D = map(int, input().split())
for i in range(inf):
    if i % 2 == 0:
        D -= A
        if D == 0:
            print('Yes')
            break
    else:
        B -= C
        if B == 0:
            print('No')
            break

Fixed submission:
from math import ceil

h_t,s_t,h_a,s_a = list(map(int, input().split()))

bearable_t = ceil(h_t/s_a)
bearable_a = ceil(h_a/s_t)

print('Yes' if bearable_t >= bearable_a else 'No')
Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
lst = list(map(int,input().split()))
plus = 0
for a in range(lst):
    plus += a
if plus <= N:
    print(N-plus)
else:
    print('-1')

Fixed submission:
N,M = map(int,input().split())
lst = list(map(int,input().split()))
plus = 0
for a in lst:
    plus += a
if plus <= N:
    print(N-plus)
else:
    print('-1')

Buggy python submission (verdict: Runtime Error):
N = int(input())
M = int(input())
lst = []
for i in range(M):
    lst.append(int(input()))
plus = 0
for a in lst:
    plus += a
if plus <= N:
    print(N-plus)
else:
    print('-1')

Fixed submission:
N,M = map(int,input().split())
lst = list(map(int,input().split()))
plus = 0
for a in lst:
    plus += a
if plus <= N:
    print(N-plus)
else:
    print('-1')
Buggy python submission (verdict: Runtime Error):
from math import gcd
K = int(input())
plus = 0
for i in range(1, K+1):
	for a in range(1, K+1):
    	x = gcd(i, a)
    	for j in range(1, K+1):
            plus += gcd(x, j)
print(plus)

Fixed submission:
from math import gcd #or import math
K = int(input())#or K = int(input())+1
plus = 0

for i in range(1,K+1):# range(1,K)
    for a in range(1,K+1):# range(1,K)
        x = gcd(i,a) #or math.gcd(i,a)
        for j in range(1,K+1):# range(1,K)
            plus += gcd(x,j) #or math.gcd(x,j)
            
print(plus)
Buggy python submission (verdict: Runtime Error):
X,Y,Z = map(int,input().split)
X,Y = Y,X
X,Z = Z,X
print(X,Y,Z)

Fixed submission:
X,Y,Z = map(int,input().split())
X,Y = Y,X
X,Z = Z,X
print(X,Y,Z)

Buggy python submission (verdict: Runtime Error):
X,Y,Z = map(int,input().split)
X,Y,Z = Z,X,Y
print(X,Y,Z)

Fixed submission:
X,Y,Z = map(int,input().split())
X,Y = Y,X
X,Z = Z,X
print(X,Y,Z)

Buggy python submission (verdict: Runtime Error):
X = int(input())
Y = int(input())
Z = int(input())
A,B,C = X,Y,Z
A,B,C = C,A,B
print(A,B,C)

Fixed submission:
X,Y,Z = map(int,input().split())
X,Y = Y,X
X,Z = Z,X
print(X,Y,Z)

Buggy python submission (verdict: Runtime Error):
X = int(input())
Y = int(input())
Z = int(input())
X,Y,Z = Z,X,Y

Fixed submission:
X,Y,Z = map(int,input().split())
X,Y = Y,X
X,Z = Z,X
print(X,Y,Z)

Buggy python submission (verdict: Runtime Error):
X = int(input())
Y = int(input())
Z = int(input())
M = X
X = Y
Y = M
M = X
X = Z
Z = M
print(X,Y,Z)


Fixed submission:
X,Y,Z = map(int,input().split())
X,Y = Y,X
X,Z = Z,X
print(X,Y,Z)

Buggy python submission (verdict: Runtime Error):
X = int(input())
Y = int(input())
Z = int(input())
X,Y = Y,X
X,Z = Z,X
print(X,Y,Z)

Fixed submission:
X,Y,Z = map(int,input().split())
X,Y = Y,X
X,Z = Z,X
print(X,Y,Z)

Buggy python submission (verdict: Runtime Error):
X = int(input())
Y = int(input())
Z = int(input())
X,Y,Z = Z,X,Y

Fixed submission:
X,Y,Z = map(int,input().split())
X,Y = Y,X
X,Z = Z,X
print(X,Y,Z)
Buggy python submission (verdict: Runtime Error):
def main(x,y):
    return x*y

main(A,B)

Fixed submission:
a, b = map(int,input().split())
def main(x,y):
    print(x*y)

main(a,b)

Buggy python submission (verdict: Runtime Error):
def main():
    return A*B

main()

Fixed submission:
a, b = map(int,input().split())
def main(x,y):
    print(x*y)

main(a,b)

Buggy python submission (verdict: Runtime Error):
A*B

Fixed submission:
a, b = map(int,input().split())
def main(x,y):
    print(x*y)

main(a,b)
Buggy python submission (verdict: Runtime Error):
import match
from  decimal import Decimal
a,b=map(map(Decimal,input().split()));
c=a*b
print(math.floor(c))

Fixed submission:
import math
from decimal import Decimal
a,b=map(Decimal,input().split());
c=a*b
print(math.floor(c));
Buggy python submission (verdict: Runtime Error):
a,b = map(input().split())
print(a*b)

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

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

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

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

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

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


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

Buggy python submission (verdict: Runtime Error):
a,b= int(input())
c= a*b
print(c)

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

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

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

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

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

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

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

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

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

Buggy python submission (verdict: Runtime Error):
A = input("Please input 1st number: ")
B = input("Please input 2nd number: ")

if int(A) >= 1 and int(A) <= 100:
  if int(B) >= 1 and int(B) <= 100:
    C = int(A) * int(B)
    print("We have" + str(A) + " x " + str(B) + " = " + str(C) + ".")
  else:
    print("Please check Number B side")
else:
  print("Please check Number A side")

print("check end.")


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

Buggy python submission (verdict: Runtime Error):
A = input("Please input 1st number: ")
B = input("Please input 2nd number: ")

if A <= 1 and A >= 100:
  if B <= 1 and B >= 100:
    C = A * B
    print("We have" + str(A) + " x " + str(B) + " = " + str(C) + ".")
  else:
    print("Please check Number B side (1 <= 100)")
else:
  print("Please check Number A side (1 <= 100)")

print("check end.")

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

Buggy python submission (verdict: Runtime Error):
a = imput("please imput number 1st:")
b = imput("please imput number 2nd:")
c = a * b

if (1 <= a <= 100) and (1 <= b <= 100):
  print(c)
  else:
    print("check number again")
end

Fixed submission:
a, b = map(int, input().split())
print(a*b)
Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8

num = input().split()
num = [int(N) for N in num]

answer = 0
num[0] -= num[1]
answer += num[1]

while num[0]>num[2]:
    num[0] -= num[2] + num[1]
    answer += num[1]
if num[0]<0:
    answer -= 0 - num[0]
    
print(answer)

Fixed submission:
# coding: utf-8

num = input().split()
N, b, r = [int(N) for N in num]

n = N % (b+r)
if n>b:
    print(int(N / (b+r)) * b + b)
else:
    print(int(N / (b+r)) * b + n)
Buggy python submission (verdict: Runtime Error):
a,b,c=int(input())
if c>=a+b:
  print(0,0)
elif a+b>c>=a:
  print(0,b-c+a)
else:
  print(a-c,b)

Fixed submission:
a,b,c=map(int,input().split())
if c>=a+b:
  print(0,0)
elif a+b>c>=a:
  print(0,b-c+a)
else:
  print(a-c,b)
Buggy python submission (verdict: Runtime Error):
A,B =map(int.input().split())

if(A>B*2):
  aaa=A*B
  print(aaa)
else:
  print(0)
  

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

if(A>B*2):
  aaa=A-B*2
  print(aaa)
else:
  print(0)
Buggy python submission (verdict: Runtime Error):
s=input()

if s=="Sunny":
  print("Cloudy")
  
elif S=="Cloudy":
  print("Rainy")
  
else:
  print("Sunny")

Fixed submission:
s=input()

if s=="Sunny":
  print("Cloudy")
  
elif s=="Cloudy":
  print("Rainy")
  
else:
  print("Sunny")
Buggy python submission (verdict: Time Limit Exceeded):
n,k,q=map(int,input().split())
a=[k]*n
for i in range(q):
  o=int(input())
  a[o-1]+=1
  for j in range(n):
    a[j]-=1

for s in range(n):
  if a[s]>0:
    print("Yes")
  else:
    print("No")


Fixed submission:
n,k,q=map(int,input().split())
a=[k-q]*n
for i in range(q):
  o=int(input())
  a[o-1]+=1
  

for s in range(n):
  if a[s]>0:
    print("Yes")
  else:
    print("No")
Buggy python submission (verdict: Runtime Error):
n=int(input())
b=list(map(int,input().split()))

x=b[1]

i=0
while n-1>i:
  if b[i]<=b[i+1]:
    x+=b[i]
    i+=1
  else:
    x+=b[i+1]
    i+=1
    
print(x)

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

x=b[0]+b[n-2]

i=1
while n-1>i:
  if b[i-1]<=b[i]:
    x+=b[i-1]
    i+=1
  else:
    x+=b[i]
    i+=1
    
print(x)

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

x=b[1]

i=0
while n-1>i:
  if b[i]<=b[i+1]:
    x+=b[i]
    i+=1
  else:
    x+=b[i+1]
    i+=1
    
print(x)

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

x=b[0]+b[n-2]

i=1
while n-1>i:
  if b[i-1]<=b[i]:
    x+=b[i-1]
    i+=1
  else:
    x+=b[i]
    i+=1
    
print(x)

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

x=a[1]

i=0
while n>i:
  if b[i]<=b[i+1]:
    x+=b[i]
    i+=1
  else:
    x+=b[i+1]
    i+=1
    
print(x)

  

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

x=b[0]+b[n-2]

i=1
while n-1>i:
  if b[i-1]<=b[i]:
    x+=b[i-1]
    i+=1
  else:
    x+=b[i]
    i+=1
    
print(x)
Buggy python submission (verdict: Runtime Error):
n=int(input())
h=list(map(int,input().split()))
h.reverse()
i=0
for i in range(n):
  if h[i]<h[i+1]:
    i+=1
  
print(i)

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

ans = 0
c = 0
for i in range(n-1):
    if h[i] >= h[i+1]:
        c += 1
    else:
        ans = max(ans, c)
        c = 0
print(max(ans, c))

Buggy python submission (verdict: Runtime Error):
n=int(input())
h=list(map(int,input().split()))
h.reverse()
i=0
while h[i]<h[i+1]:
  i+=1
  
print(i+1)
  

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

ans = 0
c = 0
for i in range(n-1):
    if h[i] >= h[i+1]:
        c += 1
    else:
        ans = max(ans, c)
        c = 0
print(max(ans, c))
Buggy python submission (verdict: Runtime Error):
n,m=input().split()
ans=0
for i in range(4,int(n)+1):
  for j in range(2,int(m[0])):
    for k in range(10):
      if i==j*k:
        ans+=1
for i in range(4,int(n)+1):
  for j in range(2,int(m[1])+1):
      if i==j*int(m[0]):
        ans+=1
print(ans)

Fixed submission:
n,m=input().split()
if int(m)>=10:
    ans=0
    for i in range(4,int(n)+1):
      for j in range(2,int(m[0])):
        for k in range(2,10):
          if i==j*k:
            ans+=1
    for i in range(4,int(n)+1):
      for j in range(2,int(m[1])+1):
          if i==j*int(m[0]):
            ans+=1
    print(ans)
else:
  print(0)
Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
a=list(map(int,input().split()))
ans=0
ans1=0
l=sum(range(1,k))
for i in range(n):
  for j in a:
    if a[i]<j:
      ans+=1
for i in range(n-1):
  for j in range(i+1,n):
    if a[i]>a[j]:
      ans1+=1
print((ans1*k+ans*l)%(10**9+7))

Fixed submission:
n,k=map(int,input().split())
a=list(map(int,input().split()))
ans=0
ans1=0
for i in range(n):
  for j in a:
    if a[i]<j:
      ans+=1
for i in range(n-1):
  for j in range(i+1,n):
    if a[i]>a[j]:
      ans1+=1
print((ans1*k+ans*(k*(k-1)//2))%(10**9+7))
Buggy python submission (verdict: Runtime Error):
n = input()
an = list(map(int, input().split()))
i=0
k=0
 
 

  
while n>i:
  k+=1/an[i]
  i+=1
  
print(1/k)

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

if a>=3200:
  print(s)
  
else:
  print("red")

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

  
while n>i:
  k+=1/an[i]
  i+1
  
print(1/k)

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

if a>=3200:
  print(s)
  
else:
  print("red")
Buggy python submission (verdict: Runtime Error):
n = input()
an = list(map(int, input().split()))
i=0
k=0
 
 

  
while n>i:
  k+=1/an[i]
  i+=1
  
print(1/k)

Fixed submission:
n = int(input())
an = list(map(int, input().split()))
i=0
k=0
 
 

  
while n>i:
  k+=1/an[i]
  i+=1
  
print(1/k)

Buggy python submission (verdict: Runtime Error):
n=int(input())
s=[int(input()) for i in range(n)]
i=0
k=0
 
 

  
while n>i:
  k+=1/s[i]
  i+1
  
print(1/k)

Fixed submission:
n = int(input())
an = list(map(int, input().split()))
i=0
k=0
 
 

  
while n>i:
  k+=1/an[i]
  i+=1
  
print(1/k)

Buggy python submission (verdict: Runtime Error):
n=int(input())
s=[input() for i in range(n)]
i=0
k=0
 
 

  
while n>i:
  k+=1/s[i]
  i+1
  
print(1/k)

Fixed submission:
n = int(input())
an = list(map(int, input().split()))
i=0
k=0
 
 

  
while n>i:
  k+=1/an[i]
  i+=1
  
print(1/k)

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

i=1
k=0

while n>=i:
  f[i]=int(input())
  i+=1
  
while n>=i:
  k+=1/f[i]
  i+1
  
print(1/k)

Fixed submission:
n = int(input())
an = list(map(int, input().split()))
i=0
k=0
 
 

  
while n>i:
  k+=1/an[i]
  i+=1
  
print(1/k)
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
b=[0]*n
k=0
for i in range(n):
  if i%2==0:
    k+=a[i]
b[0]=sum(a)-k*2
for i in range(1,n):
  b[i]=2*a[i-1]-b[i-1]
  
print(' '.join(b))

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
b=[0]*n
k=0
for i in range(n):
  if i%2==1:
    k+=a[i]
b[0]=sum(a)-k*2
for i in range(1,n):
  b[i]=2*a[i-1]-b[i-1]
yu=map(str,b) 
print(' '.join(yu))
Buggy python submission (verdict: Runtime Error):
n=input()
n.sort()
if n[0]==n[1] and n[2]==n[3]:
  print("Yes")
  
else:
  print("No")

Fixed submission:
n=input()
k=sorted(n)
if k[0]==k[1] and k[2]==k[3] and k[1]!=k[2]:
  print("Yes")
  
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().splilt()))
a.sort()
if a[n/2-1]!=a[n/2]:
  print(a[n/2]-a[n/2-1])
else:
  print(0)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
a.sort()
if a[n//2-1]!=a[n//2]:
  print(a[n//2]-a[(n//2)-1])
else:
  print(0)
Buggy python submission (verdict: Runtime Error):
n=int(input())
l=list(input())
m=int(input())
for i in range(len(l)):
	if l[i]!=l[m-1]:
    	l[i]="*"
print("".join(l))
	

Fixed submission:
n=int(input())
l=list(input())
m=int(input())
for i in range(len(l)):
  if l[i]!=l[m-1]:
    l[i]="*"
print("".join(l))
Buggy python submission (verdict: Runtime Error):
s=int(input())
c=abs(753-(s[0]+s[1]+s[2]))

for i in range(1,len(n)-2):
  sum=s[i]+s[i+1]+s[i+2]
  d=abs(753-sum)
  e=min(c,d)
  
print(e)

Fixed submission:
s = input()
m = []
for i in range(len(s)-2):
	m.append(abs(753-int(s[i:i+3])))
print(min(m))
Buggy python submission (verdict: Runtime Error):
m=0
a=0 
r=0
c=0
h=0
for j in range(n):
  if s[j][0]=="M":
    m+=1
  elif s[j][0]=="A":
    a+=1
  elif s[j][0]=="R":
    r+=1
  elif s[j][0]=="C":
    c+=1
  elif s[j][0]=="H":
    h+=1
    
ans=m*a*r+m*a*c+m*a*h+m*r*c+m*r*h+m*c*h+a*r*c+a*c*h+a*r*h+r*c*h

print(ans)

Fixed submission:
n=int(input())
s=[]
for i in range(n):
  s.append(input())
m=0
a=0 
r=0
c=0
h=0
for j in range(n):
  if s[j][0]=="M":
    m+=1
  elif s[j][0]=="A":
    a+=1
  elif s[j][0]=="R":
    r+=1
  elif s[j][0]=="C":
    c+=1
  elif s[j][0]=="H":
    h+=1
    
ans=m*a*r+m*a*c+m*a*h+m*r*c+m*r*h+m*c*h+a*r*c+a*c*h+a*r*h+r*c*h

print(ans)
Buggy python submission (verdict: Runtime Error):
A=int(input())
B=int(input())
C=int(input())
X=int(input())

a=A/50
b=B/50
c=C/50
x=X/50

count=0

for i in range(a+1):
  for l in range(b+1):
    if 0<=x-a*10-b*2<=c:
      count+=1
      
print(count)


Fixed submission:
a=int(input())
b=int(input())
c=int(input())
X=int(input())


x=X/50

count=0

for i in range(a+1):
  for l in range(b+1):
    if 0<=x-i*10-l*2<=c:
      count+=1
      
print(count)
Buggy python submission (verdict: Runtime Error):
n=int(input())
t=0
x=0
y=0
for i in range(n):
  g,h,j=map(int,input().split())
  if (g-t)%2==(abs(h-x)+abs(j-y)%2:
               print("Yes")
  else:
               print("No")
               

Fixed submission:
n=int(input())
t=0
x=0
y=0
for i in range(n):
  g,h,j=map(int,input().split())
  if (g-t)%2==(abs(h-x)+abs(j-y))%2 and (abs(h-x)+abs(j-y))<=(g-t):
    t=g
    x=h
    y=j
  else:
    print("No")
    exit()

print("Yes")
Buggy python submission (verdict: Runtime Error):
n,x=map(int,input().split())
for i in range(n+1):
  for j in range(n-i+1):
    if x==10000*i+5000*j+1000*(n-i-j):
      h=[i,j,n-i-j]
      a=h.replace(","," ")
      print(a)
      exit()
    
    
print("-1 -1 -1")

Fixed submission:
n,x=map(int,input().split())
for i in range(n+1):
  for j in range(n-i+1):
    if x==10000*i+5000*j+1000*(n-i-j):
      print(i,j,n-i-j)
      exit()
    
    
print("-1 -1 -1")
Buggy python submission (verdict: Runtime Error):
q=int(input())
for i in range(q):
  a,b=map(int,input().split())
  h=0
  for j in range(a,b+1):
    for v in range(2,round(j**0.5)):
      if j%v==0:
        for k in range(2,round(((j+1)/2)**0.5)):
          if j%k==0:
            h+=1
          else:
            pass
      else:
        pass
      
  print(h)
        

Fixed submission:
n=int(input())
print(48-n)