Problem:


Score: 100 points

Problem Statement

We have two distinct integers A and B.

Print the integer K such that |A - K| = |B - K|.

If such an integer does not exist, print IMPOSSIBLE instead.

Constraints

All values in input are integers.

0 \leq A,\ B \leq 10^9

A and B are distinct.

Input

Input is given from Standard Input in the following format:

A B

Output

Print the integer K satisfying the condition.

If such an integer does not exist, print IMPOSSIBLE instead.

Sample Input 1

2 16

Sample Output 1

9

|2 - 9| = 7 and |16 - 9| = 7, so 9 satisfies the condition.

Sample Input 2

0 3

Sample Output 2

IMPOSSIBLE

No integer satisfies the condition.

Sample Input 3

998244353 99824435

Sample Output 3

549034394



Sample input:
2 16


Sample output:
9

Submission status: Wrong Answer

Solution code:
# 入力の受け取り
A, B = map(int, input().split())

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

Submission status: Wrong Answer

Solution code:
# 入力の受け取り
A, B = map(int, input().split(" "))

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
if A%2 != B%2:
  print("IMPOSSIBLE")
else:
  print(int(abs((A-B)/2)))

Submission status: Wrong Answer

Solution code:
a, b = tuple(map(int, input().split(' ')))
if (a + b) % 2 == 1:
  print('IMPOSSIBLE')
print((a + b) // 2)

Submission status: Wrong Answer

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

if a < b:
    A = a
    B = b
else:
    A = b
    B = a

if (B - A) % 2 != 0:
	print("IMPOSSIBLE")

K = int(B - (B - A) / 2)
print(str(K))

Submission status: Wrong Answer

Solution code:
import math
a, b = [int(i) for i in input().split()]
r = a - b if a > b else b - a
if r % 2 is 0:
  print(abs(int(r / 2)))
else:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
import math
a, b = [int(i) for i in input().split()]
r = a - b
if r % 2 is 0:
  print(abs(int(r / 2)))
else:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
print((lambda x: x%2<1 and int(x/2) or 'INPOSSIBLE')(sum([int(i)for i in input().split(' ')])))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution 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")

Submission status: Wrong Answer

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

K = (A + B ) / 2

if K % 1 == 0:
  print(K)
else:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b = [int(i) for i in input().split()]

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

Submission status: Wrong Answer

Solution code:
def main():
  a, b = [int(_) for _ in input().split()]
  
  if (a+b) % 2 == 0:
    print((a+b)/2)
    
  else:
    print("IMPOSSIBLE")
main()

Submission status: Wrong Answer

Solution 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()

Submission status: Wrong Answer

Solution code:
s = input().split()

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

if k % 2 == 0:
    print(int(k))
else:
    print('IMPOSSIBLE')

Submission status: Wrong Answer

Solution code:
s = input().split()

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

if k.is_integer():
    print(k)
else:
    print('impossible')

Submission status: Wrong Answer

Solution code:
def main():
  a, b = [int(_) for _ in input().split()]
  
  if (a+b) % 2 == 0:
    print((a+b)/2)
    
main()

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
k=abs((a-b)//2)
if a%2!=b%2:
  print("IMPOSSIBLE")
else:
  print(k)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
k=abs((a-b)/2)
if a%2!=b%2:
  print("IMPOSSIBLE")
else:
  print(k)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
k=(a-b)/2
if type(k)==int:
  print(k)
else:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
A , B = map(int,input().split())
if (A + B)/2 % 1 < 1:
    print('IMPOSSIBLE')
else:
  print((A + B)/2)

Submission status: Wrong Answer

Solution code:
A , B = map(int,input().split())
print((A + B)/2)

Submission status: Wrong Answer

Solution code:
A,B = (int(i) for i in input().split())
if (A-B)%2!=0:
       print("IMPOSSIBLE")
else:
       print(max(A,B)-(max(A,B)-min(A,B)))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
a, b = map(int, input().split())

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

Submission status: Wrong Answer

Solution code:
def main():
    s = input().split()
    if (int(s[0]) + int(s[1])) % 2 == 0:
        print(int((int(s[0]) + int(s[1])/2)))
    else:

        print('IMPOSSIBLE')


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
if a < b:
    large = b
    small = a
else:
    large = a
    small = a

impossible = True
for i in range(small, large+1):
               if abs(a-i) == abs(b-i):
                   print(i)
                   impossible = False
if impossible:
    print('IMPOSSIBLE')

Submission status: Wrong Answer

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

if a % 2 != b % 2:
  	print('IMPOSSIBLE')

if (a - b) / 2 == ( b - a) / 2:
  	print((a + b) /2)

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    input_str = input()
    splited = input_str.split(' ')
    A = int(splited[0])
    B = int(splited[1])
    if (A - B) % 2 != 0:
        print('INPOSSIBLE')
    else:
        print(int(A + (B-A) / 2))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
k = (a + b) / 2

if abs(a - k) == abs(b - k):
    print(int(k))
else:
    print('IMPOSSIBLE')

Submission status: Wrong Answer

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


if a > b or b > a and (a + b) % 2 == 0:

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

else:
    print('IMPOSSIBLE')

Submission status: Wrong Answer

Solution code:

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

if a == b:
    k = 0
    print(k)
elif a > b or b > a and (a + b) % 2 == 0:

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

else:
    print('IMPOSSIBLE')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np

A,B =  map(int,input().split())

K = (np.abs(A)+np.abs(B)) / 2

if K%2 == 0:
    result = int(K)
else:
    result = "IMPOSSIBLE"
    
print(result)

Submission status: Wrong Answer

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

K = (A+B) / 2

if K%2 == 0:
    result = int(K)
else:
    result = "IMPOSSIBLE"
    
print(result)

Submission status: Wrong Answer

Solution code:
import numpy as np

A,B =  map(int,input().split())

K = (A+B) / 2

if K%2 == 0:
    result = int(K)
else:
    result = "IMPOSSIBLE"
    
print(result)

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
if (x+y) % 2 != 0:
    print('IMPOSSIBLE')
print(int((x+y) / 2))

Submission status: Wrong Answer

Solution code:
s = list(input())
print(s)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if a > b:
  temp_a = a
  a = b
  b = temp_a
  

k = (b - a) / 2
int_k = int(k)

if int_k - k == 0:
  print(a + (int_k))

Submission status: Wrong Answer

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

k = (b - a) / 2
int_k = int(k)

if int_k - k == 0:
  print(a + (int_k))

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
if a%2 != b%2:
    print('INPOSSIBLE')
    exit()
else:
    k = int((a+b)/2)
    print(k)

Submission status: Wrong Answer

Solution code:
def main():
  a, b = [int(_) for _ in input().split()]
  
  if abs(a-b) % 2 != 0:
    print("IMPOSSIBLE")
  else:
    k = min(a,b) + abs(a-b)/2
    print("{:.1g}".format(k))
    
main()

Submission status: Wrong Answer

Solution code:
def main():
  a, b = [int(_) for _ in input().split()]
  
  if abs(a-b) % 2 != 0:
    print("IMPOSSIBLE")
  else:
    k = min(a,b) + abs(a-b)/2
    print(k)
    
main()

Submission status: Wrong Answer

Solution code:
# coding: utf-8

A,B = map(int, input().split())

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

Submission status: Wrong Answer

Solution code:
# | A - K | = | B - K |
A, B = map(int, input().split())

up = (A**2-B**2)
down = (2 * ( A-B ))

if up % down == 0:
	print(up/down)
else:
	print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力

A,B = map(int, input().split())

if A%2 != B%2:
	print('IMPOSSIBLE')

else:
	K = (A+B)/2
	print(K)

Submission status: Wrong Answer

Solution code:
a, b = (int(i) for i in input().split())
 
if a % 2 != b % 2:
  print("IMPOSSIBLE")
else:
  print((a+b) / 2)

Submission status: Wrong Answer

Solution code:
a, b = (int(i) for i in input().split())
 
if (a+b) % 2 != 0:
  print("IMPOSSIBLE")
else:
  print((a+b) / 2)

Submission status: Wrong Answer

Solution code:
a, b = (int(i) for i in input().split())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
c = abs(a - b)
if (a - b) == 0:
  print(0)
elif c % 2 == 0:
  if a > b:
    print(a - c / 2)
  else:
    print(b - c / 2)
else:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
a=input().split()
num1=int(a[0])
num2=int(a[1])
k=(num1+num2)/2
if  type(k)=="float":
    print("IMPOSSIBLE")
if type(k)=="int":
    print(k)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
def asf(A,B):
  same_num=(A+B)/2
  if same_num%1==0:
  	k=same_num-min(A,B)
  	return int(k)
  else:
    return "IMPOSSIBLE"
print(asf(A,B))

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
def asf(A,B):
  same_num=(A+B)/2
  k=same_num-min(A,B)
  if k%1==0:
  	return k
  else:
    return "IMPOSSIBLE"
print(asf(A,B))

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())

ave = abs(x + y) / 2

if int(ave - int(ave) * 10) == 0:
  print(int(ave))
  exit()
print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())

ave = (x + y) / 2

if int(ave - int(ave) * 10) == 0:
  print(int(ave))
  exit()
print("IMPOSSIBLE")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
K = (A+B)
if K%2 is 0 :
  print(K//2)
else:
  print("Impossible")

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
K = (A+B)/2
if type(K) is int:
  print(K)
else:
  print("Impossible")

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
K = (A+B)//2
if type(K) is int:
  print(K)
else:
  print("Impossible")

Submission status: Wrong Answer

Solution 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)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=sum(list(map(int,input().split())))
if a%2==0:
	print(a/2)
else:
  	print('IMPOSSIBLE')

Submission status: Wrong Answer

Solution code:
a, b = map(int,input().split())
c = a+b

if c%2==0:
  print(c/2-1)
else:
  print('IMPOSSIBLE')

Submission status: Wrong Answer

Solution code:
a, b = map(int,input().split())
c = a+b

if c%2==0:
  print(c/2)
else:
  print('IMPOSSIBLE')

Submission status: Wrong Answer

Solution code:
a=list(map(int,input().split()))
print(sum(a)/2 if int(sum(a)/2)==sum(a)/2 else "IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
a=list(map(int,input().split()))
print(sum(a)/2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

temp=True
temp_number=0

temp_max= a if a >b else b
tem_min = a if a <b else b

if abs(a-b) >=1:
  print(temp_max-1)
else:
  print('IMPOSSIBLE')

Submission status: Wrong Answer

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

temp=True
temp_number=0
'''
for i in range(10**9):
  if abs(a-i)==abs(b-i):
    temp_number=i
    break

if temp_number==0:
  temp=False

if temp:
  print(temp_number)
else:
  print('IMPOSSIBLE')
'''
temp_max= a if a >b else b
tem_min = a if a <b else b

if abs(a-b) >=1:
  print(temp_max-1)
elif temp_min >=1:
  print(temp_min-1)
else:
  print('IMPOSSIBLE')

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
 
K=(A+B)/2
 
def is_integer_num(n):
    if isinstance(n, int):
        return True
    if isinstance(n, float):
        return n.is_integer()
    return False
 
if is_integer_num(K)==False:
  print("IMPOSSIBLE")
else:
  print(K)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
print(("IMPOSSIBLE",(a+b)/2)[(a+b)%2==0])

Submission status: Wrong Answer

Solution code:
A,B = list(map(int,input().split()))
ans = (A+B)%2
if ans == 0:
  print((A+B)//2)
else :
  print("impossible")

Submission status: Wrong Answer

Solution code:
N,Y= [int(i) for i in input().split()]

if(N+Y)%2 == 0 :
	print((N+Y)//2)
else:
	print("impossible")

Submission status: Wrong Answer

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

k = (a+b)/2

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
if ((a+b)/2).is_integer():
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

K = (A + B) / 2

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

Submission status: Wrong Answer

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

flag = True
for k in range(A, B):
  if abs(A - k) == abs(B - k):
    print(k)
    flag = False

if flag:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
MOD = int(1e9 + 7)
N = int(1e5)
M = 13

s = input()
dp = [[0 for x in range(M)] for x in range(N+10)]
dp[0][0] = 1

for i in range(len(s)):
    for j in range(M):
        for k in range(10):
            if s[i] == "?" or s[i] == str(k):
                dp[i+1][(j*10 +k) % M] += dp[i][j]
                dp[i+1][(j*10 +k) % M] %= MOD


print(dp[len(s)][5])

Submission status: Wrong Answer

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

k = (A+B)/2

if k.is_integer():
    print(int(k))
else:
    k = -(A+B)/2
    if k.is_integer():
        if k>0:
            print(int(k))
    else:
        print("IMPOSSOBLE")

Submission status: Wrong Answer

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

k = (A+B)/2

if k.is_integer():
    print(k)
else:
    k = -(A+B)/2
    if k.is_integer():
        print(k)
    else:
        print("IMPOSSOBLE")

Submission status: Wrong Answer

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

if ((a%2 == 1)and(b%2==1)):
    c = (a+b)/2
    print(int(c))

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

Submission status: Wrong Answer

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

if ((a%2 == 1)and(b%2==1)):
    c = (a+b)/2
    print(c)

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a,b=(int(x) for x in input().split())

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

Submission status: Wrong Answer

Solution code:
a=eval(input().replace(' ','+'));print(a%2*'IMPOSSIBLE'or a/2)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Mon Jul 29 01:57:09 2019

@author: matsui
"""


A,B=map(int,input().split())

if (A+B)&2 == 1: 
    print('IMPOSSIBLE')
else:
    K=(A+B)//2
    print(K)

Submission status: Wrong Answer

Solution code:
n, m = map(int, input().split())
if n % 2 == m % 2:
  print((n + m) / 2);
else:
  print('IMPOSSIBLE')

Submission status: Wrong Answer

Solution code:
A,B = [int(n) for n in input().split()]
print((A+B)/2 if (A+B)/2%2==0 else "IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
a, b = (int(x) for x in input().split())
ans = a/2 + b/2
if abs(a-ans) == abs(b-ans):
    print(int(ans))
else:
    print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
def main36():
    data = input().split()
    num = []
    for i in range(2):
        num.append(int(data[i]))
    if int(abs(num[0]-num[1])) % 2 == 1:
        print("IMPOSSIBLE")
    result = int(abs(num[0] + num[1]) / 2)
    print(result)

if __name__ == "__main__":
    main36()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
K = (A+B)/2
if abs(A-K) == abs(B-K):
    print((A+B)/2)
else:
    print("IMPOSSIBLE")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B = map(int,input().split())
bigger = B if A<B else A
for i in range(bigger):
    if(abs(A-i) == abs(B-i)):
        print(i)
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = list(map(int, input().split()))
A = max(N) + min(N)

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

Submission status: Wrong Answer

Solution code:
N = list(map(int, input().split()))
A = max(N) + min(N)

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

Submission status: Wrong Answer

Solution code:
N = list(map(int, input().split()))
A = max(N) + min(N)

answer = 0
if A/2 == abs(int(A/2)):
  answer = A/2
else:
  answer = "IMPOSSIBLE"
  
print(answer)

Submission status: Wrong Answer

Solution code:
N = list(map(int, input().split()))
A = max(N) - min(N)

answer = 0
if A/2 == abs(int(A/2)):
  answer = A/2 + min(N)
else:
  answer = "IMPOSSIBLE"
  
print(answer)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def update(i, j, mul):
    global dp, dpi, N, MOD


#S = input()
S = "?"*(10**4)

MOD=(10**9) + 7
N=13

dp=[[0 for i in range(N)] for j in range(100005)]
dp[0][0] = 1

dpi = 1
mul = 1

for c in S[::-1]:    
    for i in range(N):
        if c=='?':
            for j in range(10):
                ii = (i + (j*mul)) % N
                dp[dpi][ii] += dp[dpi-1][i] % MOD
                #pass
        else:
            j = int(c)
            ii = (i + (j*mul)) % N
            dp[dpi][ii] += dp[dpi-1][i] % MOD
            #pass
    mul *= 10
    mul %= N
    dpi += 1

print(dp[dpi-1][5] % MOD)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,raw_input().split())
if a%2!=b%2:
    print 'IMPOSSIBLE'
else:
    print a+b/2

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
k = 1

while True:
  if abs(a - k) == abs(b - k):
    print(k)
    exit()
  if a < k or b < k:
    print('IMPOSSIBLE')
    exit()
  k += 1

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
k = 1
while True:
  if a - k == b - k:
    print(k)
    exit()
  if a < k or b < k:
    print('IMPOSSIBLE')
    exit()
  k += 1

Submission status: Wrong Answer

Solution code:
num = input().split()
A = int(num[0])
B = int(num[1])
if (A+B)%2 == 0:
    print((A+B)/2)
else:
    print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun Jul 28 15:26:59 2019

@author: sp8783
"""

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

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

Submission status: Wrong Answer

Solution code:
AB = list(map(int, input().split()))
 
A = int(AB[0])
B = int(AB[1])
 
if A%2 == 0 and B%2 == 0:
    print((A+B)/2)
elif A%2 == 1 and B%2 == 1:
    print((A+B)/1)
else:
    print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
str = input().split()
a = int(str[0])
b = int(str[1])
print(round((a+b)/2))

Submission status: Wrong Answer

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

print((A+B)//2)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split(" "))
if A<0 or B<0 or B >10**9 or A > 10**9 or A==B:
	print ('Illegal')
else:
	if (A-B)%2!=0:
		print ('Impossible')
	else:
		print(int((A+B)/2))

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
if (a[0]+a[1])%2==0:
    print (a[0]+a[1])
else:
    print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
if (x + y) % 2 == 1:
  print("IMPOSSIBLE")
else:
  c = (x + y) /2
  print(c)

Submission status: Wrong Answer

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

for i in range(10**9+1):
    if abs(a-i) == abs(b-i):
            print(i)
            break
    elif a<i or b<i and abs(a-i) != abs(b-i):
            print('IMPOSSIBLE')
            break

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a, b = map(int,input().split())
for i in range(10000):
    if abs(a-i) == abs(b-i):
            print(i)
            break
    elif a<i and b<i and abs(a-i) != abs(b-i):
            print('IMPOSSIBLE')
            break

Submission status: Wrong Answer

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

ans = a+b/2

if type(ans) == "int":
  print(ans)
else:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
a,b = input().split()
a = int(a); b = int(b)
if abs(a-b) % 2 != 0:
    print("IMPOSSIBLE")
else:
    print(min(a,b) + abs(a-b)/2)

Submission status: Wrong Answer

Solution code:
#coding: UTF-8

i = list(map(int, input().split()))

A = i[0]
B = i[1]

print(A, B)
K = (A+B)/2

if(K.is_integer() == True):
    print(int(K))
else:
    print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
val=(a+b)/2
if(val*2==a+b):
  print(val)
else:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

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

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

else:
  print((a+b)/2)

Submission status: Wrong Answer

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

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

else:
  print((a+b)/2)

Submission status: Wrong Answer

Solution code:
a,b=[int(i) for i in input().split()]
a,b=min(a,b),max(a,b)
c=b-a
if c%2==0:
  print(c//2)
else:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if a == b:
  print("IMPOSSIBLE")
  exit()

if a > b:
  diff = a - b
  _min = b
else:
  diff = b - a
  _min = a

res = int(diff / 2)
print(res)

res = res + _min

res = res % 2 

if res == 0:
  print(res)
else:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if a == b:
  print("IMPOSSIBLE")
  exit()

if a > b:
  diff = a - b
  _min = b
else:
  diff = b - a
  _min = a

res = int(diff / 2)

res = res + _min

if res > 1:
  print(res)
else:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
a,b=map(int, input().split())
if a<b:
  a,b=b,a
#a>b is assured.
k=(a+b)/2
if k%1==0 and b<k<a:
  print(k)
else:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
a, b = (int(i) for i in input().split())  
if (a + b ) % 2 == 0:
    print(((a+b)/2))
else:
    print("IMPOSSIBLE")

Submission status: Wrong Answer

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

if a == b:
  print("IMPOSSIBLE")
  exit()

if a > b:
  diff = a - b
else:
  diff = b - a

_min = min(a, b)

res = int(diff / 2)

res = res + _min

if res != 1:
  print(res)
else:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
print(x,y)
if (x+y)%2==0:
    print((x+y)//2)
else:
    print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
a,b=map(int, input().split())
if a<b:
  a,b=b,a
#a>b is assured.
k=(a+b)/2
if k%1==0 and b<k<a:
    print(k)
else:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().strip().split()))
k= float((a[0]**2 - a[1]**2)/(2*a[0] - 2*a[1]))
if isinstance(k,int):
  print(k)
else:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().strip().split()))
k= (a[0]**2 - a[1]**2)/(2*a[0] - 2*a[1])
if isinstance(k,int):
  print(k)
else:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().strip().split()))
k= (a[0]**2 -a[1]**2)/(2*a[0] - 2*a[1])
if isinstance(k,int):
  print(k)
elif isinstance(k,float):
  print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
a,b=map(int, input().split())
if a<b:
  a,b=b,a
#a>b is assured.

flag=False
for k in range(b+1,a+1):
  if k-b==a-k:
    print(k)
    flag==True
    break
if flag==False:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
a, b = (int(i) for i in input().split())  
if (a + b ) % 2 == 0:
    print(abs((a+b)/2))
else:
    print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().strip().split()))
k= (a[0]**2 -a[1]**2)/(2*a[1] - 2*a[0])
if isinstance(k,int):
  print(k)
elif isinstance(k,float):
  print("IMPOSSIBLE")

Submission status: Wrong Answer

Solution code:
A,B=input().split()
a=int(A)
b=int(B)
if a>=b:
  x=(a-b)/2
  if x%2==0:
    print(a-x)
  else:
    print('IMPOSSIBLE') 
else:
  x=(b-a)/2
  if x%2==0:
    print(b-x)
  else:
    print('IMPOSSIBLE')

Submission status: Wrong Answer

Solution code:

S=input()
l=len(S)
nhatena=0
for s in S:
    if s != '?':
        break
    nhatena += 1

min = 10**(l-1-nhatena)
max = 10**(l)-1

# print(min)
# print(max)

mink = int((min - 5) /13) + 1 if not ((min - 5) /13.0).is_integer() else int((min - 5) /13)
maxk = int((max - 5) / 13) + 1 if not ((max - 5) /13.0).is_integer() else int((max - 5) /13)

# print(mink)
# print(maxk)

cnt=0
for k in range(mink, maxk):
    v = 13 * k + 5
    val = ("%0" + str(l) + "d") % (v)
    #Sとの一致判定
    for i,s in enumerate(S):
        if s != '?':
            if s != val[i]:
                break
    else:
        cnt += 1

    if cnt == 1000000007:
        cnt = 0

print(cnt)

Submission status: Wrong Answer

Solution code:
a, b = (int(i) for i in input().split())  
if (a + b ) % 2 == 0:
    print((a+b)/2)
else:
    print("IMPOSSIBLE")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().strip().split()))
k= (a[0]**2 -a[1]**2)/(2*a[0] - 2*a[1])
if k > 0:
  print(k)
elif k < 0:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().strip().split()))
k= (a[0]**2 -a[1]**2)/(2*a[1] - 2*a[0])
if k > 0:
  print(k)
elif k < 0:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

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