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: Accepted

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

# |A-K| = |B-K|
# A-K = -(B-K)
# K = (A+B)/2

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a = sum(map(int, input().split()))
print(a % 2 * "IMPOSSIBLE" or a // 2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from bisect import *
from heapq import *
from collections import *
from itertools import *
from functools import *

sys.setrecursionlimit(100000000)
input = lambda: sys.stdin.readline().rstrip()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
A - Harmony
https://atcoder.jp/contests/abc135/tasks/abc135_a

"""
import sys


def solve(A, B):
    if A > B:
        A, B = B, A
    diff = B - A
    if diff % 2:
        return 'IMPOSSIBLE'
    return B - diff // 2


def main(args):
    A, B = map(int, input().split())
    ans = solve(A, B)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

Solution code:
d=eval(input().replace(' ','+'))
print([d//2,'IMPOSSIBLE'][d%2])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def solve():
    N, M = map(int, input().split())
    if (N+M) % 2 == 0:
        return (N+M)//2
    return 'IMPOSSIBLE'

print(solve())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if abs(A-B) % 2 == 1:
    print("IMPOSSIBLE")
else:
    print(abs(A-B)//2+min(A, B))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

NO = "IMPOSSIBLE"  # type: str


def solve(A: int, B: int):
    K = (A + B) // 2
    return K if abs(A-K) == abs(B-K) else NO

# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    print(solve(A, B))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    a, b = map(int, input().split())
    diff = abs(max(b, a) - min(a, b))
    if diff % 2 != 0:
        print("IMPOSSIBLE")
    else:
        bigger = max(a, b)
        ans = bigger - (diff//2)
        print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# A - Harmony
a,b=list(map(int,input().split()))
if a%2==0 and b%2==0:
    print((a+b)//2)
elif a%2==1 and b%2==1:
    print((a+b)//2)
else:
    print("IMPOSSIBLE")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# abc 135 A

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

res = a + b

if res % 2:
    print("IMPOSSIBLE")
else:
    print(res // 2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

a, b = (int(x) for x in stdin.readline().rstrip().split())
print("IMPOSSIBLE" if (a+b)%2!=0 else (a+b)//2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

else:
    print('IMPOSSIBLE')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#import math
#import bisect
#import numpy as np
#import itertools
#import copy
import sys

ipti = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)

def main():
    a, b = list(map(int,ipti().split()))

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

K = (A + B) / 2
K_th = (A + B) // 2

print('IMPOSSIBLE' if K!=K_th else int(K))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
AB = list(map(int, input().split()))
total = sum(AB)

if total % 2 == 0:
    print(int(total / 2))
else:
    print("IMPOSSIBLE")

Submission status: Accepted

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

c = (a + b) / 2
if a != b and c.is_integer():
    print(int(c))
else:
    print("IMPOSSIBLE")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

i = (A+B)/2 

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

Submission status: Accepted

Solution code:
import sys

a, b = map(int, sys.stdin.readline().split())

def main():
    c = a + b
    return 'IMPOSSIBLE' if c & 1 else c // 2

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

div, modAB = divmod(A + B, 2)
if modAB == 0:
    print(div)
else:
    print("IMPOSSIBLE")

Submission status: Accepted

Solution code:
s=eval(input().replace(" ","+"))
print(s//2 if s%2==0 else "IMPOSSIBLE")

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A, B = MAP()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# https://atcoder.jp/contests/abc135/tasks/abc135_a

a, b = [int(x) for x in input().split()]
if (a - b) % 2 == 1:
    print("IMPOSSIBLE")
else:
    print((a + b) // 2)

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
div, mod = divmod(abs(A - B), 2)

if mod == 0:
    print(min(A, B) + div)
else:
    print("IMPOSSIBLE")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

a, b = map(int, sys.stdin.read().split())
if (a + b) % 2 == 1:
    print('IMPOSSIBLE')
else:
    print(int((a + b) / 2))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = (int(ab) for ab in input().split())
K = (A+B)/2
if K == int(K):
    print(int(K))
else:
    print("IMPOSSIBLE")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l = list(map(int, input().split()))
s = sorted(l, reverse=True)
cal = s[0] - s[1]
result = s[1] + (cal / 2)
if result.is_integer():
    print(int(result))
else:
    print("IMPOSSIBLE")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

NO = "IMPOSSIBLE"  # type: str


def solve(A: int, B: int):
    small = min(A,B)
    big = max(A,B)
    diff = big - small
    if diff % 2 == 0:
        print(int(small+diff/2))
    else:
        print(NO)


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# import itertools
# import math

import sys
input = sys.stdin.readline


def solve(A, B):
    K = (A + B) / 2
    if int(K) == K:
        return int(K)
    return 'IMPOSSIBLE'


# N = int(input())
# S = input()
A, B = map(int, input().split())
# A = list(map(int, input().split()))

# P = []
# S = []
# for i in range(N):
#     pp, ss = map(int, input().split())
#     P.append(pp)
#     S.append(ss)

print(solve(A, B))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
row = sys.stdin.readline
def read_ints(row):
    return list(map(int, row().split()))
  
A,B = read_ints(row)
print( int((A+B)/2) if (A+B)%2 == 0 else "IMPOSSIBLE")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if int((a+b)/2) == (a+b)/2:
    print(int((a+b)/2))
elif int(-(a+b)/2) == -(a+b)/2:
    print(int(-(a+b)/2))
else:
    print('IMPOSSIBLE')

Submission status: Accepted

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: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

I,m = divmod((A+B), 2)

if m != 0:
    res = msg
else:
    res = int((A+B)/2)

print(res)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

k_2 = A+B

if k_2%2 == 1:
    ans = "IMPOSSIBLE"
else:
    ans = str(k_2//2)
print(ans)

Submission status: Accepted

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


if __name__=="__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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