Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
a = [list(input().split()) for i in range(1)]
b=0
b = float(a[0]/a[1])
print(b)

Fixed submission:
a = [list(input().split()) for i in range(1)]
b=0
c=0
b = int(a[0][0])
c =int(a[0][1])
print(b/c)

Buggy python submission (verdict: Runtime Error):
a = [list(input().split()) for i in range(1)]
b=0
a = float(a[0]/a[1])
print(b)

Fixed submission:
a = [list(input().split()) for i in range(1)]
b=0
c=0
b = int(a[0][0])
c =int(a[0][1])
print(b/c)
Buggy python submission (verdict: Runtime Error):
s = int(input)

A = []

A.append(s)
a = s
for i in range(10000):
    if a % 2 == 0:
        a = int(a/2)
        A.append(a)
    else:
        a = 3*a+1
        A.append(a)
    if A.count(a) == 2:
        print(len(A))
        break


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

A.append(s)
a = s
for i in range(10000):
    if a % 2 == 0:
        a = int(a/2)
        A.append(a)
    else:
        a = 3*a+1
        A.append(a)
    if A.count(a) == 2:
        print(len(A))
        break

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

A = []

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


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

A.append(s)
a = s
for i in range(10000):
    if a % 2 == 0:
        a = int(a/2)
        A.append(a)
    else:
        a = 3*a+1
        A.append(a)
    if A.count(a) == 2:
        print(len(A))
        break
Buggy python submission (verdict: Runtime Error):
s = int(input)
if s == 22:
    print('Christmas Eve Eve Eve')
if s == 23:
    print('Christmas Eve Eve')
if s == 24:
    print('Christmas Eve')
if s == 25:
    print('Christmas')


Fixed submission:
s = int(input())
if s == 22:
    print('Christmas Eve Eve Eve')
if s == 23:
    print('Christmas Eve Eve')
if s == 24:
    print('Christmas Eve')
if s == 25:
    print('Christmas')
Buggy python submission (verdict: Runtime Error):
a=list(str(input()))
e=int(''.join(a))


b=int(a[1])-int(a[1]*111)
c=a[0]
c=int(c)
b = e-c*111
if b =<0:
  print(c*111)
else:
  c+=1
  print(c*111)

Fixed submission:
a=list(str(input()))
e=int(''.join(a))


b=int(a[1])-int(a[1]*111)
c=a[0]
c=int(c)
b = e-c*111
if b <=0:
  print(c*111)
else:
  c+=1
  print(c*111)
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split.())
print(a-b+1)

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

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

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

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

Fixed submission:
a, b = map(int, input().split())
print(a-b+1)
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split()) 
A = [list(input().split())   for i in range(b)]

lines =[]
for j in A:
  for k in j:
    if "#" in k:
      lines.append(k)
lines_t = ["".join(list(i)) for i in zip(*lines)]
B=[]
for g in lines_t:
    if "#" in g:
      B.append(g)
C=[]
C= ["".join(list(i)) for i in zip(*B)]
for v in C:
  print(v)

Fixed submission:
a, b = map(int, input().split())
A = [list(input().split()) for i in range(a)]

lines = []
for j in A:
    for k in j:
        if "#" in k:
            lines.append(k)
lines_t = ["".join(list(i)) for i in zip(*lines)]
B = []
for g in lines_t:
    if "#" in g:
        B.append(g)
C = []
C = ["".join(list(i)) for i in zip(*B)]
for v in C:
    print(v)
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
k = 1
s = 0
for i in map(int, input().split()):
    if s + i <= b:
        k += 1
    s += i
print(k)


Fixed submission:
x,y=map(int,input().split())
if x<y:
    print(0)
else:
    print(10)

Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
k = 1
s = 0
for i in map(int,input().split()):
    if s+i<=b:
        k+=1
    s+=i

Fixed submission:
x,y=map(int,input().split())
if x<y:
    print(0)
else:
    print(10)
Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
c = list(map(int, input().split()))
s = [0]
ans = 0
for i in range(n):
    s.append(s[-1]+c[i])
r = 0
for l in range(n):
    while r<n and s[r]-s[l]<k:
        r+=1
    ans+=n-r+int(s[r]-s[l]>=k)
print(ans)

Fixed submission:
w,h,x,y= map(int,input().split())
print(w*h/2,int(x==w/2 and y == h/2))
Buggy python submission (verdict: Runtime Error):
intA = int(input())
intX = int(input())

if 0<=intA and intA<=9 and 0<=intX and intX<=9:
	if intX<intA:
		print(0)
	else:
		print(10)

Fixed submission:
X,A = list(map(int,input().split()))
print(0 if X<A else 10)

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

if 0<=intA and intA<=9 and 0<=intX and intX<=9:
	if intX<intA:
		print(0)
	else:
		print(1)

Fixed submission:
X,A = list(map(int,input().split()))
print(0 if X<A else 10)
Buggy python submission (verdict: Runtime Error):
N,X=list(map(int,open().split()))
i=list(map(int,open().split()))
listD=[0]
d=0

for s in i:
	d=d+s
	if d <= X:
		listD.append(d)
        
print(len(listD))

Fixed submission:
N,X=list(map(int,input().split()))
i=list(map(int,input().split()))
listD=[0]
d=0

for s in i:
	d=d+s
	if d <= X:
		listD.append(d)
        
print(len(listD))
Buggy python submission (verdict: Runtime Error):
S=list(input())
li=0
li2=[]
for i in S:
	if i=='A' or i=='C' or i=='G' or i=='T':
		li+=1
	else:
		li2.append(li)
		li=0
print(max(li2))
print(li2)

Fixed submission:
S=list(input())
li=0
li2=[]
for i in S:
	if i=='A' or i=='C' or i=='G' or i=='T':
		li+=1
	else:
		li2.append(li)
		li=0
li2.append(li)
print(max(li2))

Buggy python submission (verdict: Runtime Error):
S=list(input())
li=0
li2=[]
for i in S:
	if i=='A' or i=='C' or i=='G' or i=='T':
		li+=1
	else:
		li2.append(li)
		li=0
print(max(li2))

Fixed submission:
S=list(input())
li=0
li2=[]
for i in S:
	if i=='A' or i=='C' or i=='G' or i=='T':
		li+=1
	else:
		li2.append(li)
		li=0
li2.append(li)
print(max(li2))
Buggy python submission (verdict: Runtime Error):
n, x = input().split()
l_list = input().split()
i = 0
ans = 0
y = 1
for l in l_list:
    if i > int(x):
        print(ans)
        y = 0
        break
    i += int(l)
    ans += 1
if y:
  print(ans)

Fixed submission:
x, a = input().split()
print(0) if (x < a) else print(10)
Buggy python submission (verdict: Runtime Error):
a = input()
b = input()
t = input()

print(int((t+0.5)/a)*b)

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

print(int((t+0.5)/a)*b)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
from bisect import bisect_left


def main():
    N, K = map(int, input().split())
    *a, = map(int,input().split())
    sum_a = [0] * N
    sum_a[0] = a[0]
    for i in range(N - 1):
        sum_a[i + 1] = sum_a[i] + a[i + 1]

    ans = N - bisect_left(sum_a, K)

    for l in range(1, N):
        ans += N - bisect_left(sum_a, K + sum_a[l - 1])

    print(ans)




if __name__ == '__main__':
    main()

Fixed submission:
# -*- coding: utf-8 -*-


def main():
    x, a = map(int, input().split())
    if x < a:
        print('0')
    else:
        print('10')



if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-


def main():
    n, x = map(int, input().split())
    lst = [input() for i in range(n)]
    print(n, x)
    print(lst)

    d = []
    for i in range(n + 1):
        if i == 0:
            d.append(0)
        else:
            d.append(d[i - 1] + int(lst[i - 1]))
    print(d)

    bound = 0

    for n, i in enumerate(d):
        if i <= x:
            bound += 1
        else:
            break
    print(bound)


if __name__ == '__main__':
    main()

Fixed submission:
# -*- coding: utf-8 -*-


def main():
    n, x = map(int, input().split())
    lst = list(map(int,input().split()))
    lst = lst[:n]

    d = []
    for i in range(n + 1):
        if i == 0:
            d.append(0)
        else:
            d.append(d[i - 1] + int(lst[i - 1]))

    bound = 0

    for n, i in enumerate(d):
        if i <= x:
            bound += 1
        else:
            break
    print(bound)


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-


def main():
    n, x = map(int, input().split())
    lst = [input() for i in range(n)]
    print(n, x)
    print(lst)
    
    d = []
    for i in range(n + 1):
        if i == 0:
            d.append(0)
        else:
            d.append(d[i - 1] + int(lst[i - 1]))
    print(d)
    
    bound = 0
    
    for n, i in enumerate(d):
        if i <= x:
            bound += 1
        else:
            break
    print(bound)




if __name__ == '__main__':
    main()

Fixed submission:
# -*- coding: utf-8 -*-


def main():
    n, x = map(int, input().split())
    lst = list(map(int,input().split()))
    lst = lst[:n]

    d = []
    for i in range(n + 1):
        if i == 0:
            d.append(0)
        else:
            d.append(d[i - 1] + int(lst[i - 1]))

    bound = 0

    for n, i in enumerate(d):
        if i <= x:
            bound += 1
        else:
            break
    print(bound)


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
MOD = 10 ** 9 + 7
N, M = map(int, input().split())
X = list(map(int, input().split()))
Y = list(map(int, input().split()))
SUM = 0

for i in range(N):
    for j in range(M):
        pos = i * j + (N - i - 1) * (M - j - 1)
        neg = i * (M - j - 1) + (N - i - 1) * j
        SUM = (SUM + X[i] * Y[j] * (pos - neg)) % MOD
print(SUM)


Fixed submission:
MOD = 10 ** 9 + 7
N, M = map(int, input().split())
X = list(map(int, input().split()))
Y = list(map(int, input().split()))

x_sum = 0
for i in range(N):
    x_sum = (x_sum + X[i] * (N - i - 1) - X[i] * i) % MOD

y_sum = 0
for i in range(M):
    y_sum = (y_sum + Y[i] * (M - i - 1) - Y[i] * i) % MOD

result = (x_sum * y_sum) % MOD

print(result)

Buggy python submission (verdict: Time Limit Exceeded):
MOD = 10 ** 9 + 7
N, M = map(int, input().split())
X = list(map(int, input().split()))
Y = list(map(int, input().split()))
SUM = 0

for i in range(N):
    for j in range(M):
        for k in range(i, N):
            for l in range(j, M):
                SUM = (SUM + (X[k] - X[i]) * (Y[l] - Y[j])) % MOD
print(SUM)

Fixed submission:
MOD = 10 ** 9 + 7
N, M = map(int, input().split())
X = list(map(int, input().split()))
Y = list(map(int, input().split()))

x_sum = 0
for i in range(N):
    x_sum = (x_sum + X[i] * (N - i - 1) - X[i] * i) % MOD

y_sum = 0
for i in range(M):
    y_sum = (y_sum + Y[i] * (M - i - 1) - Y[i] * i) % MOD

result = (x_sum * y_sum) % MOD

print(result)
Buggy python submission (verdict: Runtime Error):
N, A, B = map(int, input().split())
L = list(map(int, input().split()))

num = [0 for x in range(N)]
total = [0 for x in range(N)]

for i, v in enumerate(L):
    for j in reversed(range(1, i + 1)):
        new_v = total[j - 1] + v
        if(new_v > total[j]):
            total[j] = new_v
            num[j] = num[j - 1]
        elif(new_v == total[j]):
            num[j] = num[j] + num[j - 1]

    if(v > total[0]):
        total[0] = v
        num[0] = 1
    elif(v == total[0]):
        num[0] = num[0] + 1

print(total)
total = [x / (i + 1) for i, x in enumerate(total)]
total = total[(A - 1):B]
num = num[(A - 1):B]

maxV = max(total)
maxNum = sum([j for i, j in zip(total, num) if i == maxV])
print(maxV)
print(maxNum)

Fixed submission:
if __name__ == '__main__':
    h1 = input()
    a, b = h1.split()
    print((int(a) + int(b)) % 24)
Buggy python submission (verdict: Runtime Error):
import sys

argv=sys.argv

#print(argv)

x=int(argv[1])
a=int(argv[2])

if(x<a):
    print(0)
else:
    print(10)


Fixed submission:
import sys

#argv=sys.argv

#print(argv)

argv=input()
argv1,argv2=argv.split(" ")


x=int(argv1)
a=int(argv2)

if(x<a):
    print(0)
else:
    print(10)
Buggy python submission (verdict: Time Limit Exceeded):
b=[]
num=int(input())
a=input().split()

for i in range(num):
    
    b.append(a[i])
    b.reverse()


for i in range(num):
    print(b[i],end=" ")

print("")


Fixed submission:

b=[]
num=int(input())
a=input().split()


if num%2==0:
    for i in range(num-1,0,-2):
        print(a[i],end=" ")
    for i in range(0,num,2):
        print(a[i],end=" ")
else:
    for i in range(num-1,0,-2):
        print(a[i],end=" ")
    print(a[0],end=" ")
    for i in range(1,num,2):
        print(a[i],end=" ")
    


print("")
Buggy python submission (verdict: Runtime Error):

N=int(input())

a=[int(i) for i in input().split()]

color=[0,0,0,0,0,0,0,0]
alles=0

for i in range(N) :
    
    if a[i]<400 :
        color[0]+=1
    elif a[i]<800 :
        color[1]+=1
    elif a[i]<1200 :
        color[2]+=1
    elif a[i]<1600 :
        color[3]+=1
    elif a[i]<2000 :
        color[4]+=1
    elif a[i]<2400 :
        color[5]+=1
    elif a[i]<2800 :
        color[6]+=1
    elif a[i]<3200 :
        color[7]+=1
    else :
        alles+=1

        
while 0 in color :color.remove(0)
eight=int(8)

if alles>=8 :
    print(eight," ",eight)
elif alles+len(color)>=8 :
    if alles>=len(color) :
        print(alles," ",eight)
    else :
        print(len(color)," ",eight)
else :
    if alles>=len(color) :
        print(alles," ",len(color)+alles)
    else :
        print(len(color)," ",len(color)+alles)



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

s=r*100+g*10+b

if s%4==0:
    print("YES")
else :
    print("NO")
Buggy python submission (verdict: Runtime Error):

N=int(input())

a=[int(i) for i in input().split()]

color=[0,0,0,0,0,0,0,0]
alles=0

for i in range(N) :
    
    if a[i]<400 :
        color[0]+=1
    elif a[i]<800 :
        color[1]+=1
    elif a[i]<1200 :
        color[2]+=1
    elif a[i]<1600 :
        color[3]+=1
    elif a[i]<2000 :
        color[4]+=1
    elif a[i]<2400 :
        color[5]+=1
    elif a[i]<2800 :
        color[6]+=1
    elif a[i]<3200 :
        color[7]+=1
    else :
        alles+=1

        
while 0 in color :color.remove(0)
eight=int(8)

if alles>=8 :
    print(eight," ",eight)
elif alles+len(color)>8 :
    if alles>=len(color) :
        print(alles," ",eight)
    else :
        print(len(color)," ",eight)
else :
    if alles>=len(color) :
        print(alles," ",lem(color)+alles)
    else :
        print(len(color)," ",len(color)+alles)



Fixed submission:

N=int(input())

a=[int(i) for i in input().split()]

color=[0,0,0,0,0,0,0,0]
alles=0

for i in range(N) :
    
    if a[i]<400 :
        color[0]+=1
    elif a[i]<800 :
        color[1]+=1
    elif a[i]<1200 :
        color[2]+=1
    elif a[i]<1600 :
        color[3]+=1
    elif a[i]<2000 :
        color[4]+=1
    elif a[i]<2400 :
        color[5]+=1
    elif a[i]<2800 :
        color[6]+=1
    elif a[i]<3200 :
        color[7]+=1
    else :
        alles+=1

        
while 0 in color :color.remove(0)


if len(color)==0 :
    print(int(1)," ",len(color)+alles)
else :
    print(len(color)," ",len(color)+alles)
Buggy python submission (verdict: Runtime Error):
a=map(int,raw_input().split())

s=a[0]+a[1]

if s>10 :
    print("error")
else :
    print(s)



Fixed submission:

a,b=map(int,input().split())

s=a+b


if s>=10 :
    print("error")
else :
    print(s)

Buggy python submission (verdict: Runtime Error):
a=input()
b=input()
s=a+b
if s>9 :
    print('error')
else :
    print(s)


Fixed submission:

a,b=map(int,input().split())

s=a+b


if s>=10 :
    print("error")
else :
    print(s)

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

if a+b>9 :
    print('error')
else :
    print(a+b)


Fixed submission:

a,b=map(int,input().split())

s=a+b


if s>=10 :
    print("error")
else :
    print(s)
Buggy python submission (verdict: Runtime Error):
    import numpy as np
    huga = list(map(int, input().split()))
    a=huga[0]
    b=huga[1]
    c=huga[2]
    if a>b:
      x=a
      a=b
      b=x
      
     
    if a<c and b>c:
      print("Yes")
    else:
      print("No")
      

Fixed submission:
import numpy as np
huga = list(map(int, input().split()))
a=huga[0]
b=huga[1]
c=huga[2]
if a>b:
  x=a
  a=b
  b=x
        
      
if a<c and b>c:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
import numpy as np
huga = list(map(int, input().split()))
a=huga[0]
b=huga[1]
c=huga[2]
if a>b:
  a=x
  b=a
  a=x

if a<c and b>c:
  print("Yes")
else:
  print("No")
  

Fixed submission:
import numpy as np
huga = list(map(int, input().split()))
a=huga[0]
b=huga[1]
c=huga[2]
if a>b:
  x=a
  a=b
  b=x
        
      
if a<c and b>c:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
w, h, x, y = map(int, input().split())

s = w * h / 2
if (x * 2 == w) and (y * 2 == h):
    print(s, 1)
else:
    print(s, 0)

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

if x < a:
    print(0)
else:
    print(10)

Buggy python submission (verdict: Runtime Error):
w, h, x, y = map(int, input().split())

s = w * h / 2
if (x * 2 == w) and (y * 2 == h):
    print(s, 1)
else:
    print(s, 0)

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

if x < a:
    print(0)
else:
    print(10)

Buggy python submission (verdict: Runtime Error):
w, h, x, y = map(int, input().split())

s = w * h / 2
if (int(w / x) == 2) and (int(h / y) == 2):
    print(s, 1)
else:
    print(s, 0)

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

if x < a:
    print(0)
else:
    print(10)
Buggy python submission (verdict: Runtime Error):
n, x = map(int, input().split())
l = [int(i) for i in input().split()]
d = 0
i = 0
while (d <= x) and (i <= n):
    d += l[i]
    i += 1
print(i)

Fixed submission:
n, x = map(int, input().split())
l = [int(i) for i in input().split()]
l.insert(0, 0)
d = 0
i = 0
while True:
    d += l[i]
    if d > x:
        break
    i += 1
    if i > n:
        break
print(i)

Buggy python submission (verdict: Runtime Error):
n, x = map(int, input().split())
l = [int(i) for i in input().split()]
d = 0
i = 0
while d <= x:
    d += l[i]
    i += 1
    print('i:', i, 'd:', d)

print(i)

Fixed submission:
n, x = map(int, input().split())
l = [int(i) for i in input().split()]
l.insert(0, 0)
d = 0
i = 0
while True:
    d += l[i]
    if d > x:
        break
    i += 1
    if i > n:
        break
print(i)
Buggy python submission (verdict: Runtime Error):
w, h, x, y = map(int, input().split())

s = w * h / 2
if (int(w / x) == 2) and (int(h / y) == 2):
    print(s, 1)
else:
    print(s, 0)

Fixed submission:
w, h, x, y = map(int, input().split())

s = w * h / 2
if (x * 2 == w) and (y * 2 == h):
    print(s, 1)
else:
    print(s, 0)

Buggy python submission (verdict: Runtime Error):
w, h, x, y = map(int, input().split())

s = w * h / 2
print(s)
if (int(w / x) == 2) and (int(h / y) == 2):
    print(1)
else:
    print(0)

Fixed submission:
w, h, x, y = map(int, input().split())

s = w * h / 2
if (x * 2 == w) and (y * 2 == h):
    print(s, 1)
else:
    print(s, 0)
Buggy python submission (verdict: Runtime Error):
X,A = [int(x) for x in input().split()]
print(10 if x >= A else 0)

Fixed submission:
X,A = [int(x) for x in input().split()]
print(10 if X >= A else 0)
Buggy python submission (verdict: Time Limit Exceeded):
a,b,c,k = (int(x) for x in input().split())

while k:
    a,b,c = b+c,a+c,a+b
    k -= 1

ans = a-b

if ans < abs(10**18):
    print(ans)
else:
    print("Unfair")

Fixed submission:
a,b,c,k = (int(x) for x in input().split())

if abs(a-b) > 10 ** 18:
    print('Unfair')
elif a == b:
    print(0)
elif k % 2 == 0:
    print(a-b)
elif k % 2 == 1:
    print(b-a)
Buggy python submission (verdict: Runtime Error):
a,b,c,d =map(int,raw_input().split())

if c == a/2 and d == b/2:
    print a*b*.5, 1
else:
    print a*b*.5, 0

Fixed submission:
a,b =map(int,raw_input().split())
if a < b:
    print(0)
else:
    print(10)

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

if c == a/2 and d == b/2:
    print a*b/2, 1
else:
    print a*b/2, 0


Fixed submission:
a,b =map(int,raw_input().split())
if a < b:
    print(0)
else:
    print(10)

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

if c == a/2 and d == b/2:
    print a*b/2,1
else:
    print a*b/2,0

Fixed submission:
a,b =map(int,raw_input().split())
if a < b:
    print(0)
else:
    print(10)
Buggy python submission (verdict: Runtime Error):
n.m=map(int,raw_input().split())

if n<=5:
  print(0)
elif n<=12:
  print(m/2)
else:
  print(m)

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

if n<=5:
    print(0)
elif n<=12:
    print(m/2)
else:
    print(m)

Buggy python submission (verdict: Runtime Error):
n,m=map(int,raw_input().split())

a=[]

a=map(int,raw_input().split())

b=[map(int,raw_input().split() )for i in range(m)]
b=sorted(b,key=lambda x: -x[1])
for i in range(m):
    a.sort()
    if a[0]>b[i][1]:
        break
    for j in range(b[i][0]):
        if a[j] < b[i][1]:
                a[j] = b[i][1]
        else:
           break
print(sum(a))

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

if n<=5:
    print(0)
elif n<=12:
    print(m/2)
else:
    print(m)
Buggy python submission (verdict: Runtime Error):
n=input()
a=[]

a=map(int,raw_input().split())

b=[0]*100000
c=0
while c <= n-2:
    b[a[c]]+=1
    c+=2

d=[0]*100000
e=1
while e <= n-1:
    d[a[e]]+=1
    e+=2

f=sorted(b)[-2]
g=sorted(d)[-2]



if max(b) == n/2 and max(d) == n/2 and b.index(max(b)) == d.index(max(d)):
    print(n/2)
elif max(b) == n/2 and max(d) == n/2 and b.index(max(b)) != d.index(max(d)):
    print(0)
elif b.index(max(b)) == d.index(max(d)):
    print(n-max(b)-max(f,g))
else:
    print(n-max(b)-max(d))

Fixed submission:
n=input()
a=[]

a=map(int,raw_input().split())

b=[0]*100001
c=0
while c <= n-2:
    b[a[c]]+=1
    c+=2

d=[0]*100001
e=1
while e <= n-1:
    d[a[e]]+=1
    e+=2

f=sorted(b)[-2]
g=sorted(d)[-2]



if max(b) == n/2 and max(d) == n/2 and b.index(max(b)) == d.index(max(d)):
    print(n/2)
elif max(b) == n/2 and max(d) == n/2 and b.index(max(b)) != d.index(max(d)):
    print(0)
elif b.index(max(b)) == d.index(max(d)):
    print(n-max(b)-max(f,g))
else:
    print(n-max(b)-max(d))

Buggy python submission (verdict: Runtime Error):
n=input()
a=[]

a=map(int,raw_input().split())

b=[0]*100000
c=0
while c <= n-2:
    b[a[c]]+=1
    c+=2

d=[0]*100000
e=1
while e <= n-1:
    d[a[e]]+=1
    e+=2

f=sorted(b)[-2]
g=sorted(d)[-2]



if max(b) == n/2 and max(d) == n/2 and b.index(max(b)) == d.index(max(d)):
    print(n/2)
elif max(b) == n/2 and max(d) == n/2 and b.index(max(b)) != d.index(max(d)):
    print(0)
elif b.index(max(b)) == d.index(max(d)):
    print(n-max(b)-max(f,g))
else:
    print(n-max(b)-max(d))
~                              

Fixed submission:
n=input()
a=[]

a=map(int,raw_input().split())

b=[0]*100001
c=0
while c <= n-2:
    b[a[c]]+=1
    c+=2

d=[0]*100001
e=1
while e <= n-1:
    d[a[e]]+=1
    e+=2

f=sorted(b)[-2]
g=sorted(d)[-2]



if max(b) == n/2 and max(d) == n/2 and b.index(max(b)) == d.index(max(d)):
    print(n/2)
elif max(b) == n/2 and max(d) == n/2 and b.index(max(b)) != d.index(max(d)):
    print(0)
elif b.index(max(b)) == d.index(max(d)):
    print(n-max(b)-max(f,g))
else:
    print(n-max(b)-max(d))

Buggy python submission (verdict: Runtime Error):
n=input()
a=[]

a=map(int,raw_input().split())

b=[0]*10000
c=0
while c <= n-2:
    b[a[c]]+=1
    c+=2

d=[0]*10000
e=1
while e <= n-1:
    d[a[e]]+=1
    e+=2

f=sorted(b)[-2]
g=sorted(d)[-2]



if max(b) == n/2 and max(d) == n/2 and b.index(max(b)) == d.index(max(d)):
    print(n/2)
elif max(b) == n/2 and max(d) == n/2 and b.index(max(b)) != d.index(max(d)):
    print(0)
elif b.index(max(b)) == d.index(max(d)):
    print(n-max(b)-max(f,g))
else:
    print(n-max(b)-max(d))

Fixed submission:
n=input()
a=[]

a=map(int,raw_input().split())

b=[0]*100001
c=0
while c <= n-2:
    b[a[c]]+=1
    c+=2

d=[0]*100001
e=1
while e <= n-1:
    d[a[e]]+=1
    e+=2

f=sorted(b)[-2]
g=sorted(d)[-2]



if max(b) == n/2 and max(d) == n/2 and b.index(max(b)) == d.index(max(d)):
    print(n/2)
elif max(b) == n/2 and max(d) == n/2 and b.index(max(b)) != d.index(max(d)):
    print(0)
elif b.index(max(b)) == d.index(max(d)):
    print(n-max(b)-max(f,g))
else:
    print(n-max(b)-max(d))