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 == 0:
  print((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(abs((a-b)/2)))
else:
    print("IMPOSSIBLE")

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

ans = abs(A - B)
if (0 < (ans % 2)):
  print('IMPOSSIBLE')
else:
  print(ans//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:
A, B = map(int, input().split())

if not abs(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==1:
  print("IMPOSSIBLE")

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

Submission status: Wrong Answer

Solution code:
a,b=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
#a = 1
#b = 3
if (a+b)%2:
    print("IMPOSSIBLE")
else:
    print((a+b)/2)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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:
# ABC135a
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

a, b = map(int, input().split())
#print((a + b) / 2)
ans = (a + b) / 2
if (ans.is_integer()):
    print((a + b) // 2)
    exit()
print("impossible")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

def main():
    input = sys.stdin.readline
    a, b = map(int, input().split())
    if a + b % 2 == 1:
        return 'IMPOSSIBLE'
    return (a + b) // 2

if __name__ == '__main__':
    print(main())

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if B<A:
	A,B=B,A

if abs(A-B)%2==0:
	print A+abs(A-B)/2
else:
	print -1

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 %2 == 0:
    print("IMPOSSIBLE")
else:
    print(str(int((a+b)/2)))

Submission status: Wrong Answer

Solution code:
a=[]
for x in input().split(" "):
    a.append(int(x))

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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 or (A + B) % 2 == 0:
    print((A + B) // 2)
else:
    print("No")

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())
if (a + b) % 2 == 0:
    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(' '))
diff = b - a
if diff % 2 == 0:
  print(diff // 2)
else:
  print('IMPOSSIBLE')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
for x in range(A, B):
    if (A - x)**2 == (B - x)**2:
        print(x)

Submission status: Wrong Answer

Solution code:
a, b = list(map(int, input().split()))
if (max(a, b) - min(a, b)) % 2 == 1:
  print('Impossible')
else:
  print((max(a, b) + min(a, b)) // 2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b = list(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 = sorted(list(map(int,input().split())))
z = B-A

if z%2==0:
  print(z)
else:
  print("IMPOSSIBLE")

Submission status: Wrong Answer

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

a = int(x[0])
b = int(x[1])

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
for i in range(a,b+1):
  if abs(a-i)==abs(b-i):
    print(i)
    exit()
print('IMPOSSIBLE')

Submission status: Wrong Answer

Solution code:
N,K = list(map(lambda x: int(x),input().split()))
if (N+K)%2==0:
    print((N+K)/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=list(map(int,input().split()))
ans=abs(a-b)
if ans%2==1:
    print("IMPOSSIBLE")
else:
    print(int(ans/2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#JMD
#Nagendra Jha-4096

 
import sys
import math

#import fractions
#import numpy
 
###File Operations###
fileoperation=0
if(fileoperation):
    orig_stdout = sys.stdout
    orig_stdin = sys.stdin
    inputfile = open('W:/Competitive Programming/input.txt', 'r')
    outputfile = open('W:/Competitive Programming/output.txt', 'w')
    sys.stdin = inputfile
    sys.stdout = outputfile

###Defines...###
mod=1000000007
 
###FUF's...###
def nospace(l):
    ans=''.join(str(i) for i in l)
    return ans
 
 
 
##### Main ####
t=1
for tt in range(t):
    #n=int(input())
    a,b= map(int, sys.stdin.readline().split(' '))
    m=max(a,b)
    print((a+b)//2)
    #a=list(map(int,sys.stdin.readline().split(' ')))
    
    
#####File Operations#####
if(fileoperation):
    sys.stdout = orig_stdout
    sys.stdin = orig_stdin
    inputfile.close()
    outputfile.close()

Submission status: Wrong Answer

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

if (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==0:print("IMPOSSIBLE")
else:print((a+b)//2)

Submission status: Time Limit Exceeded

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

S=[a,b]
M=max(S)

for i in range(M):
  if abs(a-i)==abs(b-i):
    print(i)
    exit()
print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

Solution code:
import math

a,b=map(int, input().split())
i=0
for k in range(10**9):
  if abs(a-k)==abs(b-k):
    print(k)
    i=1
    break
if i==0:
    print('IMPOSSIBLE')

Submission status: Time Limit Exceeded

Solution code:
a, b = map(int, input().split())
for k in range(1, 10 ** 9):
  if k - a == k - b:
    print(k)
    exit()
print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

Solution code:
a, b = map(int, input().split())
for k in range(1, 1000000000):
  if k - a == k - b:
    print(k)
    exit()
print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

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

for i in range(10000000):
    re1 = abs(a - i)
    re2 = abs(b - i)
    if re1 == re2:
        print(i)
        exit(0)

print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

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

if A < B:
    pass
else:
    C = A
    A = B
    B = C
for k in range(A, B):
    if abs(A-k) ==abs(B-k):
        ans = k
        break
    else:
        ans = "IMPOSSIBLE"

print(ans)

Submission status: Time Limit Exceeded

Solution code:
a,b = map(int,input().split())
for k in range(1,10**9):
  if abs(a-k) == abs(b-k):
    print(k)
    exit()
print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

Solution code:
a,b=map(int,input().split())
n=0
result='IMPOSSIBLE'
while True:
    if abs(a-n)==abs(b-n):
        result=n
        break
    n+=1
print(result)

Submission status: Time Limit Exceeded

Solution code:
#!/usr/bin/env python3

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

C = max(A, B)

for i in range(1, C+1):
    if abs(A-i) == abs(B-i):
        print(i)
        exit()

print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

Solution code:
a,b=sorted(map(int,input().split()))
ans=0
ans2=0
for i in range(a,b+1):
    if abs(a-i)==abs(b-i):
        ans=1
        ans2=i
print(ans2 if ans==1 else "IMPOSSIBLE")

Submission status: Time Limit Exceeded

Solution code:
a,b = map(int,input().split())
f=True
for i in range(max(a,b)):
  if abs(a-i)==abs(b-i):
    print(i)
    f=False
    break
if f:
  print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

Solution code:
a, b=map(int, input().split())
k=min(a, b)
l=max(a, b)
for i in range(k, l+1):
    if abs(a-i)==abs(b-i):
        print(i)
        exit()

print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

Solution code:
A,B = map(int,input().split())
for K in range(1,max(A,B)+1):
  if abs(A-K) == abs(B-K):
    print(K)
    exit()
print('IMPOSSIBLE')

Submission status: Time Limit Exceeded

Solution code:
A, B = map(int, input().split())
a = min(A, B)
b = max(A, B)
for i in range(a, b):
    if abs(a-i) == abs(b-i):
        print(i)
        break
else:
    print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

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

for i in range(max(a, b)):
	if abs(a - i) == abs(b - i):
		print(i)
		exit()

print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

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

flag = False
for count in range(1000000000):
    if abs(A-count) == abs(B-count):
        print(count)
        flag = True
        break
if flag == False:
    print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

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

out = "IMPOSSIBLE"

for k in range(0,10**9):
  if abs(A-k) == abs(B-k):
    out = k

print(out)

Submission status: Time Limit Exceeded

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

for k in range(0,10**9):
  if abs(A-k) == abs(B-k):
    print(k)
  else:
    print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

Solution code:
A,B = map(int,input().split())
ans = int(0)
for i in range(max(A,B)):
    if abs(A-i) == abs(B-i):
        ans = i
if (ans == 0):
    print("IMPOSSIBLE")
else:
    print(ans)

Submission status: Time Limit Exceeded

Solution code:
A,B = map(int,input().split())
ans = int(0)
for i in range(max(A,B)):
    if (A-i)**2 == (B-i)**2:
        ans = i
if (ans == 0):
    print("IMPOSSIBLE")
else:
    print(ans)

Submission status: Time Limit Exceeded

Solution code:
A, B = map(int, input().split())
for K in range(10 ** 9):
    if abs(A - K) == abs(B - K):
        print(K)
    else:
        print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

Solution code:
import sys
A, B = [int(x) for x in input().split()]

for K in range(10**9):
    if abs(A - K) == abs(B - K):
        print(K)
        sys.exit

print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

Solution code:
A=list(map(int,input().split()))
for i in range(10**9):
    if abs(A[0]-i)==abs(A[1]-i):
        ans=i
        break
    else:
        ans="IMPOSSIBLE"
print(ans)

Submission status: Time Limit Exceeded

Solution code:
a,b = map(int,input().split())
for i in range(1000000000):
    if abs(a-i)==abs(b-i):
        print(i)
else:
    print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

Solution code:
a,b=map(int,input().split(" "))
h="IMPOSSIBLE"
c=[a,b]
for i in range(len(str(min(c))),10**9):
    if abs(a-i)==abs(b-i):
        h=i
        break
print(h)

Submission status: Time Limit Exceeded

Solution code:
a, b = map(int, input().split())
for i in range(max(a,b)):
  if abs(a-i) == abs(b-i):
    print(i)
    exit()
print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

Solution code:
a,b=map(int,input().split())
if (a+b)%2 != 0:
  print('IMPOSSIBLE')
else:
  for i in range(max(a,b)):
    if abs(a-i) == abs(b-i):
      print(i)

Submission status: Time Limit Exceeded

Solution code:
A, B = list(map(int, input().split()))
K = 0
for i in range(1, max(A, B)):
  if abs(A-i) == abs(B-i):
    K = i

if K:
  print(K)
else:
  print('IMPOSSIBLE')

Submission status: Time Limit Exceeded

Solution code:
a, b = map(int, input().split())
def kansu_return_flag(a,b):
    ans = 0
    flag = 0
    if a>b:
        big = a
        small = b
    else:
        big = b
        small = a
        
    for i in range(small,big):
        a_ans = abs(big-i)
        b_ans = abs(small-i)
        if a_ans == b_ans:
            ans = i
            flag = 1
            break
    return flag,ans

flag,ans = kansu_return_flag(a,b)

if flag == 1:
    print(ans)
else:
    print('IMPOSSIBLE')

Submission status: Time Limit Exceeded

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

for i in range(10**9):
    a_ans = abs(a-i)
    b_ans = abs(b-i)
    if a_ans == b_ans:
        ans = i
        flag = 1
        break

if flag == 1:
    print(ans)
else:
    print('IMPOSSIBLE')

Submission status: Time Limit Exceeded

Solution code:
import sys
A, B = map(int, raw_input().split())
counter = 0
while True:
  if abs(A - counter) == abs(B - counter) :
    print counter
    break
  counter += 1
  if counter > A and counter > B :
    print "IMPOSSIBLE"
    break

Submission status: Time Limit Exceeded

Solution code:
a,b = map(int, input().split())
if a==0 or b==0:
    print("IMPOSSIBLE")
else:
    for i in range(10**9):
        if abs(a-i) == abs(b-i):
            print(i)
    print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

Solution code:

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

max=0
if(A>B):
  max=A
else:
  max=B

while(1):
  absA=abs(A-max)
  absB=abs(B-max)

  if( absA==absB ):
    print(max)
    break
  if( max==0 ):
    print("IMPOSSIBLE")
    break

  max=max-1

Submission status: Time Limit Exceeded

Solution code:
A,B = map(int,input().split())
C = max(A,B)
for K in range(C-1):
  if abs(A-(K+1)) == abs(B-(K+1)):
    print(K+1)
    exit()

print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

y=[0]*2

y[0]=int(x[0])
y[1]=int(x[1])

K=0

while 1:
    if y[0]+y[1]==2*K:
        print(K)
        
    K=+1
    
    if y[1]<=K:
        print('IMPOSSIBLE')
        break;

Submission status: Time Limit Exceeded

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

flag=0

for K in range(0,1000000000):
    a=(int(x[0])-K)*(int(x[0])-K)
    b=(int(x[1])-K)*(int(x[1])-K)
    
    if a==b:
        print(K)
        flag=+1

if flag==0:
    print('IMPOSSIBLE')

Submission status: Time Limit Exceeded

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

for i in range(10**9):
  c = abs(a-i)
  d = abs(b-i)
  if c==d:
    print(i)
    exit()
print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

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

A = List[0]
B = List[1]

Flag = False
for K in range(int((A+B)/2) + 1):
    if abs(A-K) == abs(B-K):
        count = K
        Flag = True

if Flag == True:
    print(K)
else:
    print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

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

for i in range(1,10**9):
  if (abs(A-i) == abs(B-i)):
      print(i)
      exit()

print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

Solution code:
text = input()
figures = text.split(' ')
a = int(figures[0])
b = int(figures[1])

result = None
for i in reversed(range( abs(a-b) )):
  if abs(a - i) == abs(b - i):
    result = i
    break
  
else:
  result = 'IMPOSSIBLE'
  
print(result)

Submission status: Time Limit Exceeded

Solution code:
text = input()
figures = text.split(' ')
a = int(figures[0])
b = int(figures[1])

result = None
for i in range(10**9):
  if abs(a - i) == abs(b - i):
    result = i
    break
  
else:
  result = 'IMPOSSIBLE'
  
print(result)

Submission status: Time Limit Exceeded

Solution code:
A, B = map(int, input().split())
tmp = max(A, B)
flag = True
for i in range(tmp):
    if abs(i - A) == abs(i - B):
        print(i)
        flag = False

if flag == True:
    print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

Solution code:
a, b = map(int, input().split())
for k in range(10**9):
  if (a+k) == (b+k):
    print(k)
    exit()
print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

Solution code:
a, b = map(int, input().split())
v = 0
flag = False
for i in range(int(1e9)):
    if abs(a-i) == abs(b - i):
        v = i
        flag = True
        break

if flag:
    print(v)
else:
    print('IMPOSSIBLE')

Submission status: Time Limit Exceeded

Solution code:
a, b = (int(i) for i in input().split())
 
for i in range(0, 10**9):
  if (a-i) == (b-i):
    print(i)
    break
    
print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

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

for i in range(0, 10**9):
  if (a-i) == (b-i):
    print(i)
    
print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

Solution code:
N = list(map(int, input().split()))
max_num = max(N)

def cal():
  for n in range(max_num):
    n0 = abs(N[0] - n)
    n1 = abs(N[1] - n)
    if n0 == n1:
      return n
  return "IMPOSSIBLE"

print(cal())

Submission status: Time Limit Exceeded

Solution code:
a,b=map(int,input().split())
cnt=0
if a<b:
  for i in range(a,b,1):
      if abs(a-i)==abs(b-i):
          print(i)
          cnt+=1
else:
    for i in range(b,a,1):
      if abs(a-i)==abs(b-i):
          print(i)
          cnt+=1
if cnt==0:        
	print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

if flag:
  print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

Solution code:
A, B = map(int, input().split())
if(A>B):
    max = A
    min = B
else:
    max = B
    min = A

end_flg = False

for num in range(round(max/2),max):
    left = abs(A - num)
    right = abs(B - num)
    if(left == right):
        print(num)
        end_flg = True
        break

if(not end_flg):
    print('IMPOSSIBLE')

Submission status: Time Limit Exceeded

Solution code:
a, b = (int(x) for x in input().split())
m = max(a, b)
for k in range(m):
    if abs(a-k) == abs(b-k):
        break
if abs(a-k) == abs(b-k):
    print(k)
else:
    print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

Solution code:
# OLE?
a = input()
print(10 ** (10 ** (10 ** (10 ** (10 ** (10 ** 10))))))

Submission status: Time Limit Exceeded

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 and b<i and abs(a-i) != abs(b-i):
            print('IMPOSSIBLE')
            break

Submission status: Time Limit Exceeded

Solution code:
[A, B] = map(lambda x: int(x), input().split(" "))

def absolute_sub(x, y):
    if x > y:
        return x - y
    else:
        return -1*(x - y)

able = False

for i in range(max(A, B)):
    if absolute_sub(A, i) == absolute_sub(B, i):
        print(i)
        able = True

if not able:
    print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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

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


for i in range(diff):
  one = abs(a - i)
  two = abs(b - i)

#  print(i, one, two)

  if one == two:
    print(i)
    exit()
else:
  print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

Solution code:
A,B=(int(i) for i in input().split())
flag=0
adna=0
for K in range(-A-B, A+B):
  if abs(A-K)==abs(B-K):
    flag=1
    adna=K
    break
if flag==0:
  print('IMPOSSIBLE')
else:
  print(adna)

Submission status: Time Limit Exceeded

Solution code:
A,B=(int(i) for i in input().split())
flag=0
adna=0
for K in range(-2*A-2*B, 4*A+4*B):
  if abs(A-K)==abs(B-K):
    flag=1
    adna=K
if flag==0:
  print('IMPOSSIBLE')
else:
  print(adna)

Submission status: Time Limit Exceeded

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

for k in range(10**9+1):
    if abs(a-k)==abs(b-k):
        print(k)
        c=1
        break

if c!=1:
    print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

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

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

for i in range(1000000000):
  one = abs(a - i)
  two = abs(b - i)

  if one == two:
    print(i)
    exit()
else:
  print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

Solution code:

a,b=map(int,input().split())
k=0
ok=False
if a >b:
    max=a
    n=b
else:
    max=b
    n=a
while k<max:
    if abs(max-k) == abs(n-k):
        print(k)
        exit(0)
    else:
        k+=1
if ok == False:
    print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

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

for i in range(1000000000):
  one = abs(a - i)
  two = abs(b - i)

  if one == two:
    print(i)
    exit()
else:
  print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

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

A = abs(int(S[0]) - int(S[1]))
frag = 0
for i in range(A):
  if abs(int(S[0]) - i) == abs(int(S[1]) -i):
    print(i)
    frag = 1
  
if frag == 0:
  print('IMPOSSIBLE')

Submission status: Time Limit Exceeded

Solution code:
a, b = map(int, input().split())
large = max(a, b)
ans = 0

for i in range((a+b)//2, large):
	if abs(a - i) == abs(b - i):
		ans = i
		break

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

Submission status: Time Limit Exceeded

Solution code:
A, B = map(int, input().split())
if(A>B):
    max = A
    min = B
else:
    max = B
    min = A

end_flg = False

for num in range(min+1,max):
    left = abs(A - num)
    right = abs(B - num)
    if(left == right):
        print(num)
        end_flg = True

if(not end_flg):
    print('IMPOSSIBLE')

Submission status: Time Limit Exceeded

Solution code:
a,b = input().split()
a = int(a)
b = int(b)
if a < b:
    k = b - a
else:
    k = a - b
for cnt in range(k):
    if abs(a - cnt) == abs(b - cnt):
        no = cnt
        break
    else:
        no = "IMPOSSIBLE"
        if a - cnt < 0 and b - cnt < 0:
            break
print(no)

Submission status: Time Limit Exceeded

Solution code:
a, b = map(int, input().split())
large = max(a, b)
ans = 0

for i in range(large//2, large):
	if abs(a - i) == abs(b - i):
		ans = i
		break

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

Submission status: Time Limit Exceeded

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

ans = "IMPOSSIBLE"

if a < b:
  for i in range(a, b):
    if abs(a-i) == abs(b-i):
      ans = str(i)
      break
else:
  for i in range(b, a):
    if abs(a-i) == abs(b-i):
      ans = str(i)
      break
  
print(ans)

Submission status: Time Limit Exceeded

Solution code:
A, B = list(map(int, input().split()))
K = 0
while K < 100000000:
    ans1 = A-K
    ans2 = B-K
    if abs(A) == abs(B):
        print(K)
        break
    K = K + 1
print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

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

if a >= b:
    max = a
    min = b
else:
    min = a
    max = b
for num in range(min,max+1):
    if abs(a - num) == abs(b-num):
        print(num)
        exit()
print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

Solution code:
A, B = list(map(int, input().split()))
K = 0
A = A/2
B = B/2
while K < 100000000:
    ans1 = A-K
    ans2 = B-K
    if abs(A) == abs(B):
        print(K)
        break
    K = K + 1
print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

Solution code:
a,b = map(int,input().split())
x=0
for i in range(1000000000):
    x+=1
    if abs(a-i) == abs(b-i):
        print(i)
        exit()
print('IMPOSSIBLE')

Submission status: Time Limit Exceeded

Solution code:
a,b=map(int,input().split())
k=0
ok=False
while k<a or k<b:
    if abs(a-k) == abs(b-k):
        print(k)
        exit(0)
    else:
        k+=1
if ok == False:
    print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

Solution code:

def main():

    A,B = map(int,input().split())
    if A==0 or B==0:
        print("IMPOSSIBLE")
        exit()
    if A%2!=B%2:
        print("IMPOSSIBLE")
        exit()


    K=0
    tmp =A
    A 
    while(True):

        if abs(A-K)==abs(B-K):
            print(K)
            exit()
        K += 1



if __name__== "__main__":
    main()

Submission status: Time Limit Exceeded

Solution code:
a, b = map(int, input().split())
large = max(a, b)
ans = 0

for i in range(large):
	if abs(a - i) == abs(b - i):
		ans = i
		break

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

Submission status: Time Limit Exceeded

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

if A == 0 or B == 0:
  print('IMPOSSIBLE')
else:
  for i in range(1, 1000000000):
    qw = abs(A - i)
    qe = abs(B - i)
    if qw == qe:
      print(i)
      break

Submission status: Time Limit Exceeded

Solution code:
A, B = list(map(int, input().split()))
K = 0
while K < 10000000:
    ans1 = A-K
    ans2 = B-K
    if abs(ans1) == abs(ans2):
        print(K)
        break
    K = K + 1
else:
  print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

Solution code:
import sys

i1 = input().split(' ')
a=int(i1[0])
b=int(i1[1])

r = 0
if a>b:
  r=a
else:
  r=b

aa = abs(a)
ba = abs(b)

for i in range(r):
  aa = a-i
  ba = b-i
  if aa == ba:
    print(i)
    sys.exit()
    
  if aa==ba * -1:
    print(i)
    sys.exit()

print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

Solution code:
a,b = input().split()
for k in range(1000000000):
    if abs(int(a) - k) == abs(int(b) - k):
        no = k
        break
    else:
        no = "IMPOSSIBLE"
        
print(no)

Submission status: Time Limit Exceeded

Solution code:
from numpy import abs
nums = [int(e) for e in input().split()]
if nums[0]>nums[1]:
    for k in range(0,nums[0]):
        if abs(nums[0]-k)==abs(nums[1]-k):
            print(k)
            break
    if k==nums[0]-1:
        print("IMPOSSIBLE")
else:
    for k in range(0,nums[1]):
        if abs(nums[0]-k)==abs(nums[1]-k):
            print(k)
            break
    if k==nums[1]-1:
        print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

Solution code:
A, B = list(map(int, input().split()))
K = 0
while K < 1000000000:
    ans1 = A-K
    ans2 = B-K
    if abs(ans1) == abs(ans2):
        print(K)
        break
    K = K + 1
else:
  print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

Solution code:
Ask = input()
puts = Ask.split()


A = int(puts[0])
B = int(puts[1])

for i in range(max(A,B)):
	C = abs(A-i)
	D = abs(B-i)
	if (C == D):
		print(i)
		Pos = True
		break
	else:
		Pos = False
	
if not Pos:
	print('IMPOSSIBLE')

Submission status: Time Limit Exceeded

Solution code:
import sys

i1 = input().split(' ')
a=int(i1[0])
b=int(i1[1])

r = 0
if a>b:
  r=a
else:
  r=b

aa = abs(a)
ba = abs(b)

for i in range(r):
  aa = abs(a-i)
  ba = abs(b-i)
  if aa==ba:
    print(i)
    sys.exit()

print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

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

for i in range(5*10**8):
  k = abs(A - i )
  l = abs(B - i)
  if k == l:
    print(k)
  else:
    print('IMPOSSIBLE')

Submission status: Time Limit Exceeded

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

n = max(a, b)

for i in range(n):
    if abs(a-i) == abs(i-b):
        print(i)
        exit()

print('IMPOSSIBLE')

Submission status: Time Limit Exceeded

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

for i in range(10**9):
  k = abs(A - i)
  l = abs(B - i)
  if k == l:
    print(k)
  else:
    print('IMPOSSIBLE')

Submission status: Time Limit Exceeded

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

for i in range(10**9):
    if abs(A-i) == abs(B-i):
        print(i)
        break
else:
    print("IMPOSSIBLE")

Submission status: Time Limit Exceeded

Solution code:
a, b = map(int, input().split()) 
for i in range(10**9+1):
  if abs(a-i) == abs(b-i):
    print(i)
    exit()

print("IMPOSSIBLE")