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: Runtime Error

Solution code:

inp = input().split(" ")
a = inp[0]
b = inp[1]
 
c = (a - b) % 2 
if c == 0:
  abs_a = abs(a)
  abs_b = abs(b)
 
  m = (max(abs_a, abs_b) - min(abs_a, abs_b)) /2
  ans = max(abs_a, abs_b) - m
  print(int(ans))
else:
  print("IMPOSSIBLE")

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
#! /usr/bin/python
# -*- encoding: utf-8 -*-


if __name__ == '__main__':
    input = list(map(int, input().split()))
    inputA = input[0]
    inputB = input[1]
    
    if inputA < 0:
        sys.stdout.write("IMPOSSIBLE")
        sys.exit()
    
    if inputB < 0:
        sys.stdout.write("IMPOSSIBLE")
        sys.exit()

    if inputA == inputB:
        sys.stdout.write("IMPOSSIBLE")
        sys.exit()

    if (inputA + inputB) % 2 == 0:
        sys.stdout.write(int((inputA + inputB) / 2))
        sys.exit()
      
    sys.stdout.write("IMPOSSIBLE")
    sys.exit()

Submission status: Runtime Error

Solution code:
n = int(input())
n
a = list(map(int, input().split(' ')))#モンスター
b = list(map(int, input().split(' ')))#勇者
b.append(0)
beat = 0

for i in range(n):
    mada = b[i]-a[i]
    beat += min(b[i],a[i])
    if mada > 0:
        b[i+1] += mada
beat += min(a[-1],b[-1])

print(beat)

Submission status: Runtime Error

Solution code:
#! /usr/bin/python
# -*- encoding: utf-8 -*-


if __name__ == '__main__':
    input = list(map(int, input().split()))
    inputA = input[0]
    inputB = input[1]
    
    if inputA < 0:
        sys.stdout.write("IMPOSSIBLE")
        sys.exit()
    
    if inputB < 0:
        sys.stdout.write("IMPOSSIBLE")
        sys.exit()

    if inputA == inputB:
        sys.stdout.write("IMPOSSIBLE")
        sys.exit()

    if (inputA + inputB) % 2 == 0:
        sys.stdout.write(int((inputA + inputB) / 2))
        sys.exit()
      
    else (inputA + inputB) % 2 != 0:
        sys.stdout.write("IMPOSSIBLE")
        sys.exit()

Submission status: Runtime Error

Solution code:
N = int(input())
A = list(int(x) for x in input().split())
B = list(int(x) for x in input().split())
a = 0
b = 0
for x in range(N):
    B[x] = B[x] + a
    if A[x] > B[x]:
        b = b + B[x]
        a = 0
    else:
        b = b + A[x]
        if A[x] > a:
            a = B[x] - A[x]
        else:
            a = B[x]
if A[N - 1] > B[N - 1]:
    print(b)
else:
    if A[N] > a:
        print(b + a)
    else:
        print(b + A[N])

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#! /usr/bin/python
# -*- encoding: utf-8 -*-


if __name__ == '__main__':
    input = list(map(int, input().split()))
    inputA = input[0]
    inputB = input[1]
    
    if inputA < 0:
      sys.stdout.write("IMPOSSIBLE")
        
    elif inputB < 0:
      sys.stdout.write("IMPOSSIBLE")
        
    elif inputA == inputB:
      sys.stdout.write("IMPOSSIBLE")

    elif (inputA + inputB) % 2 == 0:
      sys.stdout.write(int((inputA + inputB) / 2))
      
    elif (inputA + inputB) % 2 != 0:
      sys.stdout.write("IMPOSSIBLE")

    else:
      sys.stdout.write("IMPOSSIBLE")

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A,B=(int(i) for i in input().split())
if A%2!=B%2:
  print('IMPOSSIBLE')
else:
  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: Runtime Error

Solution code:
import numpy as np

N = int(input())
p = [int(x) for x in input().split(" ")]

sorted_p = sorted(p)
count = 0
for i in range(N):
    if sorted_p[i] != p[i]: count += 1

if count == 0 or count == 2:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
num = int(input())
if num >= 2:
  input_list = [int(i) for i in input().split()] 
  sorted_list = sorted(input_list)

  count = 0
  for input, sort in zip(input_list, sorted_list):
    if input != sort:
      count += 1

  if count < 2:
    print('YES')
  else:
    print('NO')
print('NO')

Submission status: Runtime Error

Solution code:
a = input('A: ')
b = input('B: ')
c = int(a + b)

def judge_int():
    if c % 2 == 0:
        return c/2
    elif c % 2 != 0:
        return "IMPOSSIBLE"

print(judge_int())

Submission status: Runtime Error

Solution code:
num = int(input())
if num > 2:
  input_list = [int(i) for i in input().split()] 
  sorted_list = sorted(input_list)

  count = 0
  for input, sort in zip(input_list, sorted_list):
    if input != sort:
      count += 1

  if count < 2:
    print('YES')
  else:
    print('NO')
print('NO')

Submission status: Runtime Error

Solution code:
N = int(input())
mnstr = list(map(int, input().split()))
yusha = list(map(int, input().split()))
sum = 0
killed = 0

for i in range(N):
  killedtemp1 = min(mnstr[i], yusha[i])#iの勇者が倒したモンスターiの数
  yusha[i] = max(0, yusha[i]-mnstr[i])
  killedtemp2 = min(mnstr[i+1], yusha[i])#iの勇者が倒したモンスターi+1の数
  mnstr[i+1] = mnstr[i+1] - killedtemp2
  killed += killedtemp1 + killedtemp2
  
print(killed)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

count = 0
zan_A_i = A[N]

for i in range(N):
    zan_B_i = B[N-1-i] - zan_A_i

    if zan_B_i < 0:
        #count += zan_B_i #A_i res
        zan_B_i = 0
    zan_A_i = A[N-1-i] - zan_B_i
    if zan_A_i < 0:
        count += zan_A_i 
        zan_A_i = 0

print(sum(B)+count)

Submission status: Runtime Error

Solution code:
x = input.split()
a = int(x[0])
b = int(x[1])
s = a + b
if s % 2 == 1:
  print("IMPOSSIBLE")
else:
  print(s // 2)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
 
c = (a - b) % 2 
if c == 0:
  abs_a = abs(a)
  abs_b = abs(b)
 
  m = (max(abs_a, abs_b) - min(abs_a, abs_b)) /2
  ans = max(abs_a, abs_b) - m
  print(int(ans))
else:
  print("IMPOSSIBLE")

Submission status: Runtime Error

Solution code:
x=int(input())
y=int(input())
z=0
for i in range(0:y):
    x=abs(x-i)
    y=abs(y-i)
    z=i
    if x==y:
        break
if x==y:
    print z
else:
    print "IMPOSSIBLE"

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
 
c = (a - b) % 2 
if c == 0:
  abs_a = abs(a)
  abs_b = abs(b)
 
  m = (max(abs_a, abs_b) - min(abs_a, abs_b)) /2
  ans = max(abs_a, abs_b) - m
  print(ans)
else:
  print("IMPOSSIBLE")

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())

c = (a - b) % 2 
if c == 0:
  abs_a = abs(a)
  abs_b = abs(b)

  m = (max(abs_a, abs_b) - min(abs_a, abs_b)) /2
  ans = max(abs_a, abs_b) - m
  print(ans)
else:
  print("IMPOSSIBLE")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
P = list(map(int,input().split()))
A = []
for i in range(N-1):
    if P[i]>P[i+1]:
        A.append([(P[i],i),(P[i+1],i+1)])
l = len(A)
if l > 2:
    print("NO")
elif l ==1:
    print("NO")
elif l == 0:
    print("YES")
else:
    a = max(A[0])
    b = min(A[1])
    P[a[1]],P[b[1]] = b[0],a[0]
    #print(P)
    for j in range(N-1):
        if P[j] > P[j+1]:
            print("NO")
            break
    if j == N-2:
        print("YES")

Submission status: Runtime Error

Solution code:
a = list(map(int,input().strip().split()))
for k in range(a[0]+1,a[1]):
  if abs(a[0]-k) == abs(a[1]-k):
    print(i)
  else:
    print("IMPOSSIBLE")

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

Solution code:
from sys import stdin

n = int(stdin.readline().rstrip())

print(n)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
, B = map(int, input().split())
 
if A > B:
  for i in range(A):
    k = abs(A - i)
    l = abs(B - i)
    if k == l:
      print(i)
  else:
    print('IMPOSSIBLE')
if A < B:
  for i in range(B):
    k = abs(A - i)
    l = abs(B - i)
    if k == l:
      print(i)
  else:
    print('IMPOSSIBLE')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from sys import stdin

n = int(stdin.readline().rstrip())

a, b = n[0], n[1]

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

Submission status: Runtime Error

Solution code:
print(IMPOSSIBLE)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())

c = (a - b) % 2 
if c == 0:
  abs_a = abs(a)
  abs_b = abs(b)
  ans = max(abs_a, abs_b) - (((max(abs_a, abs_b)/2) - min(abs_a, abs_b))/2)
  print(ans)
else:
  print("IMPOSSIBLE")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = input()

a,b = n[0], n[1]

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

Submission status: Runtime Error

Solution code:
a = input()
b = input()

c = (a - b) % 2 
if c == 0:
  abs_a = abs(a)
  abs_b = abs(b)
  ans = max(abs_a, abs_b) - (((max(abs_a, abs_b)/2) - min(abs_a, abs_b))/2)
  print(ans)
else:
  print("IMPOSSIBLE")

Submission status: Runtime Error

Solution code:
a,b = input()

Submission status: Runtime Error

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: Runtime Error

Solution code:
arr = input().split(" ")
A = int(arr[0])
B = int(arr[1])
 
K = (A + B) / 2
if isinstance(K, int) == true:
  print(K)
else:
  print("IMPOSSIBLE")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())

p = [int(x) for x in input().split(' ')]
sorted_p = sorted(p)
count = 0
for i in range(N):
    if p[i] != sorted_p[i]:
        count += 1
if count == 0 or count == 2:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#! /usr/bin/python
# -*- encoding: utf-8 -*-


if __name__ == '__main__':
    input = list(map(int, input().split()))
    inputA = input[0]
    inputB = input[1]
    
    if inputA < 0:
      print("IMPOSSIBLE")
        
    elif inputB < 0:
      print("IMPOSSIBLE")
        
    elif inputA == inputB:
      print("IMPOSSIBLE")

    elif (inputA + inputB) % 2 == 0:
      print(int((inputA + inputB) / 2))
      
    elif (inputA + inputB) % 2 != 0:
      print("IMPOSSIBLE")

    else:
      print("IMPOSSIBLE")

Submission status: Runtime Error

Solution code:
N = int((input()))
S = input().split()
s=[]
b=[]
#print(S)
for i in range (N):
  s.append(int(S[i]))
#print(s)
for i in range(N):
  if s[i]==i+1:
    pass
  else:
    b.append(i)
#print(b)
if len(b)<3:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
A,B = [int(li) for i in input().split(" ")]
flag = 0

if A>B:
	leng = A
else:
  leng ~ B
  
for k in range(leng):
  if (abs(A-k) == abs(B-k)):
    flag = 1
    print(k)
    break
    
if flag == 0:
  print("IMPOSSIBL")

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
#! /usr/bin/python
# -*- encoding: utf-8 -*-


if __name__ == '__main__':
    input = list(map(int, input().split()))
    inputA = input[0]
    inputB = input[1]
    
    if inputA < 0:
      print("IMPOSSIBLE")
        
    elif inputB < 0:
      print("IMPOSSIBLE")
        
    if inputA == inputB:
      print("IMPOSSIBLE")

    elif (inputA + inputB) % 2 == 0:
      print(int((inputA + inputB) / 2))
      
    elif (inputA + inputB) % 2 != 0:
      print("IMPOSSIBLE")

    else:
      print("IMPOSSIBLE")

Submission status: Runtime Error

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: Runtime Error

Solution code:
#! /usr/bin/python
# -*- encoding: utf-8 -*-


if __name__ == '__main__':
    input = list(map(int, input().split()))
    inputA = input[0]
    inputB = input[1]

    if inputA == inputB:
      print("IMPOSSIBLE")

    elif (inputA + inputB) % 2 == 0:
      print(int((inputA + inputB) / 2))
      
    elif (inputA + inputB) % 2 != 0:
      print("IMPOSSIBLE")

    else:
      print("IMPOSSIBLE")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
arr = input().split(" ")
A = int(arr[0])
B = int(arr[1])

K = (A + B) / 2
if isinstance(K, int) == true:
  print(K)
else:
  print("IMPOSSIBLE")

Submission status: Runtime Error

Solution code:
#! /usr/bin/python
# -*- encoding: utf-8 -*-


input = list(map(int, input().split()))
inputA = input[0]
inputB = input[1]

if inputA == inputB:
  print("IMPOSSIBLE")

elif (inputA + inputB) % 2 == 0:
  print(int((inputA + inputB) / 2))
  
elif (inputA + inputB) % 2 != 0:
  print("IMPOSSIBLE")

else:
  print("IMPOSSIBLE")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

A=input()
A=int(A)
B=input()
B=int(B)
i=0
while (abs(A-i)!=abs(B-i)):
  i+=1
if(i==10**9):
    print('IMPOSSIBLE')
print(i)

Submission status: Runtime Error

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


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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=(a+b)//2
k=(a+b)/2
if(c==k):
    print(k)
else:
    print("IMPOSSIBLE")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

K=abs(A+B)/2

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
inputA,B = input().split()
a = int(A)
b = int(B)
K = (a+b)/2
if K == int(K):
  print(int(K))
else:
  print('IMPOSSIBLE')

Submission status: Runtime Error

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

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

k = (A + B) / 2

if k.is_integer() == False:
	print(IMPOSSIBLE)
else:
	print(int(k))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

from sympy import *

x = sympy.Symbol('x') #xを変数xとして定義
f = 2*x -a-b 

solutions=sympy.solve(f,x) # f=0としてxを解き変数solutionsに代入
print(solutions)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

K=(B-A)/2

if (B-A) % 2 == 0;
	print(K)
else;
	print("IMPOSSIBLE")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A,B=input()
i=0
while (abs(A-i)!=abs(B-i)):
  i++  
if(i==10**9) print('IMPOSSIBLE')
print(i)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
def main():
    import sys
    input = sys.stdin.readline

    AB = input().split(" ")
    A = int(AB[0])
    B = int(AB[1])
    if (A + B) % 2 == 1:
        res = 'IMPOSSIBLE'
    elif:
        res = int((A + B) / 2)
    print(res)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
998244353 99824435

Submission status: Runtime Error

Solution code:
S = input()

S = list(map(int, S.split()))

A = S[0]
B = S[1]

f = (A+B) / 2

if f.is_integer():
    print(int(f))
else:
    print(IMPOSSIBLE)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;

int main() {
    int a, b;
    cin >> a >> b;
    if ((a + b) % 2 != 0)
        cout << "IMPOSSIBLE";
    else
        cout << (a + b) / 2;
}

Submission status: Runtime Error

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

x = a+b
if x%2 == 1:
  print('IMPOSSIBLE')
else:
  print('{}',x//2)

Submission status: Runtime Error

Solution code:
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;

int main(){
    int a,b;
    bool ans = true;
    cin >>c >>b;
    if((a + b) % 2 ==0){
        cout << (a+b)/2 << endl; 
    }else{
        cout << "IMPOSSIBLE" << endl;
    }
}

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

if abs(A - K) == abs(B - K):
  print(K)
else:
  print('IMPOSSIBLE')

Submission status: Runtime Error

Solution code:
	//k_k_dubey_
#include<bits/stdc++.h>
#define mod 1000000007
#define ll long long
#define inf 999999999999
#define mx 200005
#define gcd __gcd
#define pb push_back
#define mk make_pair
#define bs binary_search
#define pq priority_queue
#define ub upper_bound
#define lb lower_bound
#define endl "\n"
#define vl vector<ll>
#define vs vector<string>
#define non __builtin_popcount
#define ml map<ll, ll> 
#define ms map<string , ll> 
using namespace std;

bool isp[mx];

void sv(){

	ll i,j;
	memset(isp, true, sizeof(isp));
	
	isp[1]= false;
	for(i=2;i*i<mx;i++){
		if(isp[i]){
			for(j=i*i;j<mx;j+=i)
			isp[j]= false;
		}
	}
}

ll powr(ll a,ll b)
{
	ll res=1;
	while(b)
	{
		if(b&1)res=(res*a)%mod;
		a=(a*a)%mod;
		b>>=1;
	}
	return res;
}
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
	//sv();
	
	ll a1, a2, a, b;
	cin>>a>>b;
	
	if((a+b)&1)
	cout<<"IMPOSSIBLE";
	
	else
	cout<<(a+b)/2;
	
    return 0;
}

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;

int main() {
    int a, b;
    cin >> a >> b;
    if ((a + b) % 2 != 0)
        cout << "IMPOSSIBLE" << endl;
    else
        cout << (a + b) / 2 << endl;
}

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
if abs(a-b) / 2 == int(abs(a-b) / 2):
  print( abs(a-b) / 2 )
else:
  print("IMPOSSIBLE")

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define MAXN 100001


int main() {
    int a, b;
    cin >> a >> b;
    int ans = a+b;

    if ( ans % 2 ==0 ) {
        cout << (a+b)/2 << endl;
    } else {
        cout << "IMPOSSIBLE" << endl;
    }

}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

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

if (A+B)%2=1:
  print("IMPOSSIBLE")

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

Submission status: Runtime Error

Solution code:
#include<iostream>
#include<iomanip>
#include<climits>
#include<vector>
#include<list>
#include<functional>
#include<algorithm>
#include<string>
#include<cmath>
#include<complex>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<deque>
#include<tuple>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;



int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	int A, B;
	cin >> A >> B;
	int C = A + B;
	if (C % 2) cout << "IMPOSSIBLE\n";
	else cout << C / 2 << endl;
	
	return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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())
    n,k= map(int, sys.stdin.readline().split(' '))
    if((n+k)%2==0):
      print((n+k)//2)
     else:
      print("IMPOSSIBLE")
    #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: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
stdin = sys.stdin

sys.setrecursionlimit(10 ** 7)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x) - 1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

a, b = li()

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

Submission status: Runtime Error

Solution code:
from copy import *
from sys import *
import math
import queue
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac

setrecursionlimit(1000000)

def main():
	a,b = map(int,input())
	if((a+b)%2==0):
		print((a+b)//2)
	else:
		print('IMPOSSIBLE')
def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

	for k in range(2, int(math.sqrt(n)) + 1):
		if n % k == 0:
			return False

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(m,n):
	x = max(m,n)
	y = min(m,n)
	while(x%y!=0):
		z = x%y
		x = y
		y = z
	return y

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

main()