qyliang/CodeNanoFix huggingface dataset:
Buggy code:
# -*- coding: utf-8 -*-

inputAB = input()
inputAB.split()

inputA = int(inputAB[0])
inputB = int(inputAB[2])

if inputA > inputB:
    largeNum = inputA
    smallNum = inputB
else:
    largeNum = inputB
    smallNum = inputA


if ((largeNum - smallNum) % 2) == 1:
    print("IMPOSSIBLE")
else:
    answer = int(smallNum + (largeNum - smallNum) / 2)
    print(answer)

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

inputAB = input().split()

inputA = int(inputAB[0])
inputB = int(inputAB[1])

# print(inputA, inputB)

if inputA > inputB:
    largeNum = inputA
    smallNum = inputB
else:
    largeNum = inputB
    smallNum = inputA

# print(largeNum, smallNum)

if ((largeNum - smallNum) % 2) == 1:
    print("IMPOSSIBLE")
else:
    answer = smallNum + int((largeNum - smallNum) / 2)
    print(answer)
Buggy code:
a , b = map(int, input().split())
x = a-b
if x%2 == 1:
    print("IMPOSSIBLE")
else:
    print((a+b)/2)

Fixed code:
a,b = map(int,input().split())
if (b-a)%2==1:
  print("IMPOSSIBLE")
else:
  m = int((a+b)/2)
  print(m)
Buggy code:
a,b=map(int,input().split())
if a+b%2:
  print("IMPOSSIBLE")
else:
  print(a+b//2)

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

if (a + b) % 2 == 1:
    print("IMPOSSIBLE")
else:
    print((a + b) // 2)
Buggy code:
a,b=map(int,input().split())
if a+b%2!=0:
  print("IMPOSSIBLE")
else:
  print(a+b//2)

Fixed code:
a,b=map(int,input().split())
if (a+b)%2!=0:
  print("IMPOSSIBLE")
else:
  print((a+b)//2)
Buggy code:
# -*- coding: utf-8 -*-

a_b_list = list(map(int,input().split()))
a = a_b_list[0]
b = a_b_list[1]

k = (a + b) / 2
l = (a + b) % 2

if l == 0:
  print(k)
else:
  print("IMPOSSIBLE")

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

a_b_list = list(map(int,input().split()))
a = a_b_list[0]
b = a_b_list[1]

k = (a + b) / 2
l = (a + b) % 2

if l == 0:
  print(int(k))
else:
  print("IMPOSSIBLE")
Buggy code:
ab = list(map(int, input().split()))

k = (ab[0] + ab[1]) /2

if abs(ab[0] - k) == (abs(ab[1] - k)):
    print(int(k))
else:
    print("IMPOSSIBLE")

Fixed code:
ab = list(map(int, input().split()))

k = int((ab[0] + ab[1]) /2)

if abs(ab[0] - k) == (abs(ab[1] - k)):
    print(int(k))
else:
    print("IMPOSSIBLE")
Buggy code:
def main():
    a, b = [int(x) for x in input().split()]
    if (a+b)%2 == 0:
        print((a+b)/2)
    else:
        print('IMPOSSIBLE')


if __name__ == '__main__':
    main()


Fixed code:
def main():
    a, b = [int(x) for x in input().split()]
    if (a+b)%2 == 0:
        k = int((a+b)/2)
        print(k)
    else:
        print('IMPOSSIBLE')


if __name__ == '__main__':
    main()
Buggy code:
def main():
    a, b = [int(x) for x in input().split()]
    if (a+b)%2 == 0:
        k = (a+b)/2
        if (a<k and k<b) or (b<k and k<a):
            print(k)
    else:
        print('IMPOSSIBLE')


if __name__ == '__main__':
    main()


Fixed code:
def main():
    a, b = [int(x) for x in input().split()]
    if (a+b)%2 == 0:
        k = int((a+b)/2)
        if (a<k and k<b) or (b<k and k<a):
            print(k)
    else:
        print('IMPOSSIBLE')


if __name__ == '__main__':
    main()
Buggy code:
#135  Harmony
A,B = map(int, input().split())
print((A+B)/2 if (A+B)%2 == 0 else 'IMPOSSIBLE')

Fixed code:
#135  Harmony
A,B = map(int, input().split())
print((A+B)//2 if (A+B)%2 == 0 else 'IMPOSSIBLE')
Buggy code:
a,b=map(int,input().split())
print (abs((a-b)/2) if (a-b)%2==0 else "IMPOSSIBLE")

Fixed code:
a,b=map(int,input().split())
print (int((a+b)/2) if (a-b)%2==0 else "IMPOSSIBLE")
Buggy code:
A,B = map(int,input().split())
if (A+B)%2==0:
  print((A+B)/2)
else:
  print("IMPOSSIBLE")

Fixed code:
A,B = map(int,input().split())
if (A+B)%2==0:
  print(int((A+B)/2))
else:
  print("IMPOSSIBLE")
Buggy code:
a,b=map(int,input().split())
print ((a+b)/2 if (a-b)%2==0 else "IMPOSSIBLE")


Fixed code:
a, b = map(int, input().split())
if (a + b) % 2 == 0:
    print((a+b)//2)
else:
    print("IMPOSSIBLE")
Buggy code:
A, B = map(int, input().split())

if A % 2 != B % 2:
  K = "IMPOSSIBLE"
elif A > B:
  # A - K = - (B - K)
  # 2K = A + B
  K = int((A + B) / 2)
else:
  # B - K = - (A - K)
  # 2K = B - A
  K = int((B - A) / 2)
print(K)
  

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

if A % 2 != B % 2:
  K = "IMPOSSIBLE"
else:
  # B - K = - (A - K)
  # 2K = B - A
  K = int((B + A) / 2)
print(K)
Buggy code:
A,B=map(int,input().split())
if A%2==B%2:
  print((A+B)/2)
else:
  print("IMPOSSIBLE")
  

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

if (A + B) % 2:
    print("IMPOSSIBLE")
else:
    print((A + B) // 2)
Buggy code:
a,b=map(int,input().split())

if (b-a)%2==0:
  print((b-a)//2)
else:
  print("IMPOSSIBLE")

Fixed code:
a,b=map(int,input().split())
if (a-b)%2==0:
  print((a+b)//2)
else:
  print('IMPOSSIBLE')
Buggy code:
S = input().split()

A = abs(int(S[0]) - int(S[1]))
ans = 0
if A % 2 == 0:
  ans = A / 2 
  print(ans)
else:
  print('IMPOSSIBLE')


Fixed code:
S = input().split()

A = abs(int(S[0]) - int(S[1]))
ans = 0
if A % 2 == 0:
  ans = int(A / 2) 
  if int(S[0]) > int(S[1]):
    print(ans + int(S[1]))
  else:
    print(ans + int(S[0]))
else:
  print('IMPOSSIBLE')
Buggy code:
A, B = list(map(int, input().split()))

if (A + B) % 2 == 0:
  K = (A + B) / 2
else:
  K = 'IMPOSSIBLE'

print(K)

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

if (A + B) % 2 == 0:
  K = int((A + B) / 2)
else:
  K = 'IMPOSSIBLE'

print(K)
Buggy code:
a, b = map(int, input().split())
ans = (a+b)/2 if (a+b) % 2 == 0 else 'IMPOSSIBLE'
print(ans)


Fixed code:
a, b = map(int, input().split())
ans = (a+b)//2 if (a+b) % 2 == 0 else 'IMPOSSIBLE'
print(ans)
Buggy code:
a,b=sorted(map(int,input().split()))
print((b-a)//2 if (b-a)%2==0 else "IMPOSSIBLE" )

Fixed code:
a,b=sorted(map(int,input().split()))
print((b+a)//2 if (b+a)%2==0 else "IMPOSSIBLE" )
Buggy code:
A,B=map(int,input().split())
if abs(A+B)%2==0:
    print(abs(A+B)/2)
else:
    print("IMPOSSIBLE")

Fixed code:
A, B = map(int, input().split())
if (A + B) % 2 != 0:
    print("IMPOSSIBLE")
else:
    print((A + B) // 2)
Buggy code:
a,b=map(int,input().split())
x=(a+b)/2
if x.is_integer()==1:print(x)
else:print("IMPOSSIBLE")

Fixed code:
a,b=map(int,input().split())
x=(a+b)/2
if x.is_integer()==1:print(int(x))
else:print("IMPOSSIBLE")
Buggy code:
A, B = map(int, input().split())
print((A + B) / 2 if A + B % 2 == 0 else 'IMPOSSIBLE')

Fixed code:
A,B = map(int, input().split())
if (A - B) % 2 == 0:
  print(int((A+B)/2))
else:
    print('IMPOSSIBLE')
Buggy code:
a,b=map(int,input().split())
if (a+b)%2 == 0:
    print(a+b)/2
else:
    print("IMPOSSIBLE")


Fixed code:
a,b=map(int,input().split())
if (a+b)%2 == 0:
    print((a+b)//2)
else:
    print("IMPOSSIBLE")
Buggy code:
A, B = map(int, input().split())
print((A+B) // 2 if (A+B) % 2 else "IMPOSSIBLE")

Fixed code:
A,B = map(int,input().split())
if (A+B)%2 ==1:
    print("IMPOSSIBLE")
else:
    print((A+B)//2)
Buggy code:
a,b = map(int, input().split())
if a+b % 2 == 0:
  print((a+b) // 2)
else:
  print("IMPOSSIBLE")


Fixed code:
a,b = map(int, input().split())
if abs(a-b) % 2 == 0:
    print(int((a+b)/2))
else:
    print("IMPOSSIBLE")
Buggy code:
a,b=map(int,input().split())
sum=a+b
if sum%2==0:
  print(sum/2)
else:
  print("IMPOSSIBLE")

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

if (a + b) % 2  == 0:
    print((a + b) // 2)
else:
    print('IMPOSSIBLE')
Buggy code:
# a,b=map(int,input())
# n=int(input())
# n=input()
a,b=[int(s) for s in input().split()]
ans=(a-b)/2
if ans==int(ans):
    print(ans)
else:
    print('IMPOSSIBLE')

Fixed code:
# a,b=map(int,input())
# n=int(input())
# n=input()
a,b=[int(s) for s in input().split()]
ans=(a+b)/2
if ans==int(ans):
    print(int(ans))
else:
    print('IMPOSSIBLE')
Buggy code:
a, b = map(int, input().split())
print((a + b)/ 2 if (a + b) % 2  == 0 else 'IMPOSSIBLE')

Fixed code:
a, b = map(int, input().split())
o = (a+b)/2
o = int(o) if o%1 == 0 else "IMPOSSIBLE"
print(o)
Buggy code:
a, b = map(int, input().split())
if (a+b)% == 0:
  print((a+b)/2)
else:
  print('IMPOSSIBLE')

Fixed code:
a,b = map(int, input().split())
if (a+b) % 2 == 0:
  print(int((a+b)/2))
else:
  print("IMPOSSIBLE")
Buggy code:
A,B = map(int,input().split())

K = (A+B)/2
K_ = (A+B)%2
if K_>0:
  print("IMPOSSIBLE")
else:
  print(K)

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

K = (A+B)/2
K_ = (A+B)%2
if K_>0:
  print("IMPOSSIBLE")
else:
  print(int(K))
Buggy code:
a,b = map(int, input().split())
k=(a+b)//2
if abs(a-k)==(b-k):
  print(k)
else:
  print("IMPOSSIBLE")

Fixed code:
a,b = map(int, input().split())
k=(a+b)//2
if abs(a-k)==abs(b-k):
  print(k)
else:
  print("IMPOSSIBLE")
Buggy code:
a,b=map(int,input().split())

if a+b%2==0:
    print(int((a+b)/2))
else :
    print('IMPOSSIBLE')

Fixed code:
a, b = map(int, input().split())
sum = a + b

if sum % 2 == 0:
  print(sum // 2)
else:
  print('IMPOSSIBLE')
Buggy code:
a,b=map(int,input().split())
print("IMPOSSIBLE" if (a+b)%2==1else (a+b//2))


Fixed code:
a,b=map(int,input().split())
print("IMPOSSIBLE" if (a+b)%2==1else ((a+b)//2))
Buggy code:
Tmp = []
Tmp = input().rstrip().split(' ')

nA = int(Tmp[0])
nB = int(Tmp[1])

nAns = nA + nB

nTmp = nAns % 2

if nTmp == 1:
  print("IMPOSSIBLE")
else:
  nAns /= 2
  print(nAns)




Fixed code:
Tmp = []
Tmp = input().rstrip().split(' ')
 
nA = int(Tmp[0])
nB = int(Tmp[1])
 
nAns = nA + nB
 
nTmp = nAns % 2
 
if nTmp == 1:
  print("IMPOSSIBLE")
else:
  nAns /= 2
  print("%d" %(nAns))
Buggy code:
a,b = list(map(int,input().split()))
x = str((a+b)/2)
lis = x.split(".")
syousuu = lis[1]
if syousuu == "0":
  print(x)
else:
  print("IMPOSSIBLE")
  

Fixed code:
a,b = list(map(int,input().split()))
x = str((a+b)/2)
lis = x.split(".")
syousuu = lis[1]
if syousuu == "0":
  print(lis[0])
else:
  print("IMPOSSIBLE")
Buggy code:
A,B=map(int,input().split())
if (A+B)%2==0:
  print((A+B)/2)
else:
  print("IMPOSSIBLE")
  

Fixed code:
A, B = map(int, input().split())
print((A+B)//2 if (A+B)%2==0 else 'IMPOSSIBLE')
Buggy code:
a, b = map(int, input().split())

print(a)
print(b)

if ((a + b) % 2) == 0:
    print((a + b) // 2)
else:
    print('IMPOSSIBLE')


Fixed code:
a,b = map(int,input().split())
if (a + b) % 2 == 1:
  print("IMPOSSIBLE")
else:
  print((a + b)//2)
Buggy code:
A, B = map(int, input().split())
if abs(A - B) % 2 == 1:
    print('IMPOSSIBLE')
else:
    print((A + B) / 2)

Fixed code:
A, B = map(int, input().split())
if abs(A - B) % 2 == 1:
    print('IMPOSSIBLE')
else:
    print(int((A + B) / 2))
Buggy code:
A, B = list(map(int, input().split()))

if (A-B)%2 == 0:
  print(abs(A-B)//2)
  
else:
  print("IMPOSSIBLE")

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

if (A-B)%2 == 0:
  print((A+B)//2)
  
else:
  print("IMPOSSIBLE")
Buggy code:
a, b = map(int, input().split())
print((a+b)//2 if (A+B)%2==0 else "IMPOSSIBLE")

Fixed code:
A, B = map(int, input().split())
print((A+B)//2 if (A+B)%2==0 else "IMPOSSIBLE")
Buggy code:
def main():
  a, b = [int(_) for _ in input().split()]
  
  if (a+b) % 2 == 0:
    print("{:.1g}".format((a+b)/2))
    
  else:
    print("IMPOSSIBLE")
main()

Fixed code:
def main():
  a, b = [int(_) for _ in input().split()]
  
  if (a+b) % 2 == 0:
    x = (a+b)/2
    print("{:.0f}".format(x))
    
  else:
    print("IMPOSSIBLE")
main()
Buggy code:
a,b = map(int,input().split())

k = (a+b)/2

if(k.is_integer()):
    print(k)
else:
    print("IMPOSSIBLE")


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

k = (a+b)/2

if(k.is_integer()):
    print(int(k))
else:
    print("IMPOSSIBLE")
Buggy code:
A, B = map(int, input().split())

C = A + B
if C%2 == 0:
  print(C/2)
else:
  print('IMPOSSIBLE')
  

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

print((A+B)//2 if (A+B)%2==0 else "IMPOSSIBLE")
Buggy code:
A, B = map(int, input().split())

C = A + B
if C%2 == 0:
  print(C)
else:
  print('IMPOSSIBLE')
  

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

C = A + B
if C%2 == 0:
  print(C//2)
else:
  print('IMPOSSIBLE')
Buggy code:
input_data = input().split()
A = int(input_data[0])
B = int(input_data[1])

answer = (A+B)/2
if answer.is_integer() == True:
  print(int(answer))
else:
  print('impossible')

Fixed code:
input_data = input().split()
A = int(input_data[0])
B = int(input_data[1])

answer = (A+B)/2
if answer.is_integer() == True:
  print(int(answer))
else:
  print('IMPOSSIBLE')
Buggy code:
a,b=map(int,input().split())
if a=b:
  print(0)
elif (a+b)%2==0:
  print((a+b)//2)
else:
  print('IMPOSSIBLE')

Fixed code:
a,b = map(int,input().split())
if (a+b)%2:
    print("IMPOSSIBLE")
else:
    print((a+b)//2)
Buggy code:
a,b=map(int,input().split())

if (a+b)%2==0:
    print((a+b)%2)
else:
    print("IMPOSSIBLE")


Fixed code:
a,b=map(int, input().split())
print((a + b)//2 if (a + b) %2==0 else 'IMPOSSIBLE')
Buggy code:
A,B = map(int,input().split())
X = (A+B)/2
if (A+B)%2 != 0:
  print("IMPOSSIBLE")
else:
  print(X)


Fixed code:
A,B = map(int,input().split())
X = (A+B)/2
if (A+B)%2 != 0:
  print("IMPOSSIBLE")
else:
  print(int(X))
Buggy code:
A,B = map(int,input().split())
if (A+B) % 2 == 0:
    K = int((A+B)/2)
    print(K)
elif (A+B) % 2 == 1:
    print('impossible')

Fixed code:
A,B = map(int,input().split())
if (A+B) % 2 == 0:
    K = int((A+B)/2)
    print(K)
elif (A+B) % 2 == 1:
    print('IMPOSSIBLE')
Buggy code:
a,b=map(int,input().split())
if (a+b) % 4 ==0:
  print(int((a+b)/4))
  else:
    print("IMPOSSIBLE")

Fixed code:
a,b=map(int,input().split())
if (a+b) % 2 ==0:
  print(int((a+b)/2))
else:
  print("IMPOSSIBLE")
Buggy code:
a,b=map(int,input().split())

if (a+b)%2==0:
    print((a+b)/2)
else:
    print("IMPOSSIBLE")


Fixed code:
a, b = map(int, input().split())
if (a+b)%2==1:
	print("IMPOSSIBLE")
else:
	print(int((a+b)/2))
Buggy code:
A, B = map(int, input().split())
print(A + B // 2 if (A + B) % 2 == 0 else "IMPOSSIBLE")

Fixed code:
A, B = map(int, input().split())
print((A + B) // 2 if (A + B) % 2 == 0 else "IMPOSSIBLE")
Buggy code:
# -*- coding: utf-8 -*-

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

print((a+b)/2 if (a+b)%2==0 else 'IMPOSSIBLE')


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

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

print((a+b)//2 if (a+b)%2==0 else 'IMPOSSIBLE')
Buggy code:
a  = list(map(int, input().split()))
b = abs(a[0] - a[1])

if b % 2 == 0:
  print(abs(a[0] - b // 2))
else:
  print("IMPOSSIBLE")

Fixed code:
a  = list(map(int, input().split()))
b = abs(a[0] - a[1])
 
if b % 2 == 0:
  print(max(a[0], a[1]) - b // 2)
else:
  print("IMPOSSIBLE")
Buggy code:
A, B = map(int, input().split())

if (B-A) % 2 == 1:
    print('impossible')
    exit()

tmp = (B-A) // 2
print(B-tmp)

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

if (B-A) % 2 == 1:
    print('IMPOSSIBLE')
    exit()

tmp = (B-A) // 2
print(B-tmp)
Buggy code:
a, b = map(int, input().split())
k = (a*a - b*b)/(2*a-2*b)

if float.is_integer(k):
    print(k)
else:
    print("IMPOSSIBLE")

Fixed code:
a, b = map(int, input().split())
k = (a*a - b*b)/(2*a-2*b)

if float.is_integer(k):
    print(int(k))
else:
    print("IMPOSSIBLE")
Buggy code:
a , b = map(int, input().split())
if (a+b)%2 == 0:
    print((a+b)/2)
else :
    print("IMPOSSIBLE")


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

print((a+b)//2 if (a+b)%2 == 0 else 'IMPOSSIBLE')
Buggy code:
A, B, = map(int, input().split())
C = (A + B) / 2
print(int(C)) if (A + B) % 2 == 0 else print("impossible")

Fixed code:
A, B, = map(int, input().split())
C = (A + B) / 2
print(int(C)) if (A + B) % 2 == 0 else print("IMPOSSIBLE")
Buggy code:
a, b = map(int, input().split())
if (a + b) % 2 == 0:
  print((a + b) / 2)
else:
  print('IMPOSSIBLE')


Fixed code:
a, b = map(int, input().split())
if (a + b) % 2 == 0:
  print(int((a + b) / 2))
else:
  print('IMPOSSIBLE')
Buggy code:
A, B = map(int, input().split())
if (A + B) % 2 != 0:
    print("IMPOSSIBLE")
else:
    print((A + B) / 2)

Fixed code:
A,B = map(int, input().split())
k_2 = A + B
if k_2 % 2 == 0:
  print(k_2 // 2)
else:
  print('IMPOSSIBLE')
Buggy code:
a,b=map(int,input().split())
if (a+b)%2==0:
    print(a+b//2)
else:
    print('IMPOSSIBLE')


Fixed code:
a,b = list(map(int,input().split()))
if (a+b)%2==0:
  print(int((a+b)/2))
else:
  print("IMPOSSIBLE")
Buggy code:
A, B = map(int, input().split())
if (A-B)%2 == 0:
    print(A+abs(A-B)//2)
else:
    print("IMPOSSIBLE")

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

if abs(A - B) % 2 == 1 :
    print('IMPOSSIBLE')
else :
    print((A + B) // 2)
Buggy code:
A,B = map(int,input().split())
K=(A+B)/2
if K%1==0:
  print(K)
else:
  print('IMPOSSIBLE')

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

if (A + B) % 2 == 0:
    print((A+B)//2)
else:
    print('IMPOSSIBLE')
Buggy code:
a, b = map(int, input().split())
if (a+b)%2 != 0:
  print('IMPOSSIBLE')
else:
  print((a+b)/2)

Fixed code:
a,b=map(int,input().split())
x=a+b
if x%2==0:
	print(x//2)
else:
	print('IMPOSSIBLE')
Buggy code:
a,b = map(int, input().split())

if a > b:
  c = a
  a = b
  b = c

if (a - b) % 2 != 0:
  print("IMPOSSIBLE")
else:
  print(int(a+b)/2)

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

if a > b:
  c = a
  a = b
  b = c

if (a - b) % 2 != 0:
  print("IMPOSSIBLE")
else:
  print(int((a+b)/2))
Buggy code:
A, B = map(int,input().split)
ans = A + B
if ans % 2 == 0:
  print(ans //2)
else:
  print("IMPOSSIBLE")

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

if (A+B) % 2 == 0:
	print((A+B)//2)
else:
	print("IMPOSSIBLE")
Buggy code:
a, b = map(int, input().split())
if a%2 != b%2:
  print('IMPOSSIBLE')
else:
  print((a+b)/2)

Fixed code:
a, b = map(int, input().split())
if((a + b) % 2 == 1):
    print("IMPOSSIBLE")
else:
    print((a + b) // 2)
Buggy code:
A, B = [int(x) for x in input().split(" ")]

if (A+B)%2 == 0:
  print((A+B)/2)
else:
  print("INPOSSIBLE")


Fixed code:
A, B = [int(x) for x in input().split(" ")]

if (A+B)%2 == 0:
  print(int((A+B)/2))
else:
  print("IMPOSSIBLE")
Buggy code:
a,b=map(int,input().split())
if a == b:
    print(0)
elif (a+b)%2 == 0:
    print((a+b)//2)
else:
    print('INPOSSIBLE')

Fixed code:
a,b=map(int,input().split())
if a == b:
    print(0)
elif (a+b)%2 == 0:
    print((a+b)//2)
else:
    print('IMPOSSIBLE')
Buggy code:
k = sum(list(map(int, input().split())))/2
if k % 1:
    print('IMPOSSIBLE')
    exit()
print(k)

Fixed code:
k = sum(list(map(int, input().split())))/2
if k % 1:
    print('IMPOSSIBLE')
    exit()
print(int(k))
Buggy code:
A, B = map(int, input().split())
K =  (A + B) // 2
if ((A + B)%2 == 0) & (A-K)**2==(B-K)**2:
    print(K)
else:
    print("IMPOSSIBLE")

Fixed code:
A, B = map(int, input().split())
K =  (A + B) // 2
if ((A + B)%2 == 0) & ((A-K)**2==(B-K)**2):
    print(K)
else:
    print("IMPOSSIBLE")
Buggy code:
a=list(map(int,input().split()))
print(sum(a)/2 if int(sum(a)/2)==sum(a)/2 else "IMPOSSIBLE")

Fixed code:
a=list(map(int,input().split()))
print(int(sum(a)/2) if int(sum(a)/2)==sum(a)/2 else "IMPOSSIBLE")
Buggy code:
a, b = list(map(int, input().split(' ')))
print((a+b) // 2 if a + b % 2 == 0 else 'IMPOSSIBLE)

Fixed code:
a,b = map(int,list((input().split())))
if (a+b)%2==0:
	print(int((a+b)/2))
else:
	print("IMPOSSIBLE")
Buggy code:
s = input()
A = int(s.split()[0])
B = int(s.split()[1])

if A == B:
  print(0)
elif (A + B) % 2 == 0:
  print((A+B)/2)
else:
  print('IMPOSSIBLE')

Fixed code:
s = input()
A = int(s.split()[0])
B = int(s.split()[1])
 
if (A + B) % 2 == 0:
  print(int((A+B)/2))
else:
  print('IMPOSSIBLE')
Buggy code:
a,b=map(int,input().split())
if (a+b)%2 == 0:
    print((a+b)//2)
else:
    print('INPOSSIBLE')

Fixed code:
a,b=map(int,input().split())
if((a+b)%2==0):
    print((a+b)//2)
else:
    print("IMPOSSIBLE")
Buggy code:
x=list(map(int,input().split()))

if (x[0] + x[1]) % 2 == 0:
    print((x[0] + x[1]) / 2)
else:
    print("IMPOSSIBLE")

Fixed code:
x=list(map(int,input().split()))

if (x[0] + x[1]) % 2 == 0:
    print(int((x[0] + x[1]) / 2))
else:
    print('IMPOSSIBLE')
Buggy code:
A,B=map(int, input().split())

if (A+B)%2==0:
	print((A+B)/2)
else:
	print("IMPOSSIBLE")

Fixed code:
A, B = map(int, input().split())
S = A + B
print(S // 2 if S % 2 == 0 else 'IMPOSSIBLE')
Buggy code:
A,B=map(int,input().split())

K=abs(A+B)/2

if abs(A+B) % 2 == 0:
	print(K)
else:
	print("IMPOSSIBLE")

Fixed code:
A,B = map(int,input().split())
if ((A+B)%2 == 0):
    print(int((A+B)/2))
else:
    print('IMPOSSIBLE')
Buggy code:
N = int(input())

A = list(map(int,input().split()))
B = list(map(int,input().split()))
cnt = 0

ai = A[0]
ai2 = A[1]

for i in range(N):

  bi = B[i]
  
  if ai <= bi:
    cnt += ai
    
    if ai2 <= (bi - ai):
      cnt += ai2
      ai = max(0, ai2-(bi - ai))
      ai2 = A[i+2]
    else:
      cnt += (bi - ai)
      ai = max(0, ai2-(bi - ai))
      ai2 = A[i+2]
      
  else:
    cnt += bi
    ai = A[i+1]
    ai2 = A[i+2]
  
print(int(cnt))

Fixed code:
N = int(input())

A = list(map(int,input().split()))
B = list(map(int,input().split()))
cnt = 0

A.append(0)
A.append(0)

ai = A[0]
ai2 = A[1]

for i in range(N):

  bi = B[i]
  
  if ai <= bi:
    cnt += ai
    
    if ai2 <= (bi - ai):
      cnt += ai2
      ai = max(0, ai2-(bi - ai))
      ai2 = A[i+2]
    else:
      cnt += (bi - ai)
      ai = max(0, ai2-(bi - ai))
      ai2 = A[i+2]
      
  else:
    cnt += bi
    ai = A[i+1]
    ai2 = A[i+2]
  
print(int(cnt))
Buggy code:
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
ans = 0
for i in range(N):
    cankill = B[i]
    ans += min([A[i],B[i]])
    if B[i] - A[i] > 0:
        ans += B[i] - A[i]
        A[i+1] += - (B[i] - A[i])
print(ans)

Fixed code:
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
ans = 0
for i in range(N):
    cankill = B[i]
    ans += min([A[i],B[i]])
    if B[i] - A[i] > 0:
        additional = min([B[i] - A[i],A[i+1]])
        ans += additional
        A[i+1] += - additional
print(ans)
Buggy code:
i = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = []
d = 0
e = 0
z = 0

for f in range(i):
    d = b[f] - a[f]
    if d >= 0:
        z = z + a[f]
        a[f+1] = a[f+1] - d
        if a[f+1] >= 0:
            z = z + d
    elif d < 0:
        z = z + b[f]
        b[f] = 0
        
print(z)

Fixed code:
i = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = []
d = 0
e = 0
z = 0
y = 0

for f in range(i):
    d = b[f] - a[f]
    if d > 0:
        z = z + a[f]
        y = a[f+1]
        a[f+1] = a[f+1] - d
        if a[f+1] <= 0:
            a[f+1] = 0
            z = z + y
        else:
            z = z + d
    elif d < 0:
        z = z + b[f]
    else:
        z = z + a[f]
print(z)
Buggy code:
N = input()
A = list((map(int,input().split()))
B = list(map(int,input().split()))

ans = 0
         
for i in range(0,N):
    left = A[i] - B[i]
	ans += min(A[i],B[i])
         
    if left < 0:
		right = A[i+1] - abs(left)
    	ans += min( A[i+1],abs(left))
		A[i+1] = right

print(ans)


Fixed code:
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))

ans = 0
         
for i in range(0,N):
      left = A[i] - B[i]
      ans += min(A[i],B[i])
         
      if left < 0:
          right = A[i+1] - abs(left)
          if right < 0: right = 0
          ans += A[i+1] - right
          A[i+1] = right

print(ans)
Buggy code:
R = lambda: map(int, input().split())
input()
a = list(R())
def f():
    y = 0
    for u, v, w in zip(R(), a, a[1:]):
        x = min(v - y, u)
        y = x + min(w, u - x)
        yield x + y
print(sum(f()))


Fixed code:
R = lambda: map(int, input().split())
input()
a = list(R())
def f():
    y = 0
    for u, v, w in zip(R(), a, a[1:]):
        x = min(v - y, u)
        y = min(w, u - x)
        yield x + y
print(sum(f()))
Buggy code:
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
 
ans = 0
for i in range(N):
    left = min(A[i], B[i])
    B[i] -= left
    ans += left
    right = min(A[i + 1], B[i])
    A[i + 1] -= right
    B[i] -= right
    ans += right
 

Fixed code:
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
 
ans = 0
for i in range(N):
    left = min(A[i], B[i])
    B[i] -= left
    ans += left
    right = min(A[i + 1], B[i])
    A[i + 1] -= right
    B[i] -= right
    ans += right
 
print(ans)