TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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.

Submission attempts (in order):
a,b = map(int,input().split())
if (a + b)%2 == 0 :
    print((a+b)/2)
else:
    print("IMPOSSIBLE") 

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

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

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

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

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

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

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

Submission attempts (in order):
a, b = map(int,input().split())

x = abs(a-b)

print(x)

if x % 2 != 0:
    print("IMPOSSIBLE")
    exit()

if a < b:
    print(a + (x // 2))
else:
    print(b + (x // 2))

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

x = abs(a-b)

if x % 2 != 0:
    print("IMPOSSIBLE")
    exit()

if a < b:
    print(a + (x // 2))
else:
    print(b + (x // 2))

Verdicts: Wrong Answer

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

Submission attempts (in order):
import itertools

def getint(): return int(input())
def getints(): return list(map(int, input().split()))

a,b=list(sorted(getints()))


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


import itertools

def getint(): return int(input())
def getints(): return list(map(int, input().split()))

a,b=list(sorted(getints()))


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


import itertools

def getint(): return int(input())
def getints(): return list(map(int, input().split()))

a,b=list(sorted(getints()))


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


Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b=INTM()
    if (a+b)%2==!:
        print('IMPOSSIBLE')
    else:
        print((a+B)//2)
if __name__ == '__main__':
    do()

INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b=INTM()
    if (a+b)%2==1:
        print('IMPOSSIBLE')
    else:
        print((a+B)//2)
if __name__ == '__main__':
    do()

INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b=INTM()
    if (a+b)%2==1:
        print('IMPOSSIBLE')
    else:
        print((a+b)//2)
if __name__ == '__main__':
    do()

Verdicts: Runtime Error

Runtime Error

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

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

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


Verdicts: Wrong Answer

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

Submission attempts (in order):
a,b=map(int,input().split())
if (a+b)%2==0:
  print(a+b)
else:
  print("IMPOSSIBLE")

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
q, r = divmod(sum(map(int, input().split())), 2)
print(q if r else 'IMPOSSIBLE')

q, r = divmod(sum(map(int, input().split())), 2)
print('IMPOSSIBLE' if r else q)

Verdicts: Wrong Answer

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

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


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


Verdicts: Runtime Error

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

Submission attempts (in order):
a,b=map(int, input().split())

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


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

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


Verdicts: Wrong Answer

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

Submission attempts (in order):
N,M=map(int,input().split())
if (N+M)%2==0:
  print((N+M)/2)
else:
  print("IMPOSSIBLE")

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

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

Verdicts: Wrong Answer

Runtime Error

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

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

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

Verdicts: Runtime Error

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

Submission attempts (in order):
 a = list(map(int,input().split()))
if sum(a)%2 == 0:
    print(sum(a)//2)
else:
    print('IMPOSSIBLE')

n,*p = map(int,open(0).read().split())
ans = 0
for i in range(n):
    if i+1 != p[i]:
        if i+1 == p[p[i]-1]:
            ans += 1

print('YES' if ans == 0 or 2 else 'NO')

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

Verdicts: Runtime Error

Runtime Error

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

Submission attempts (in order):
a,b = map(int,input().split())

k = (a+b)/2

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


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

k = (a+b)/2

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


Verdicts: Wrong Answer

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

Submission attempts (in order):
x,y = map(int,input().split())
if (x + y) % 2 == 1:
  print("IMPOSSIBLE")
else:
  c = (x + y) /2
  print(c)

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

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

Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
a,b = input().split()

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


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

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


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

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


Verdicts: Runtime Error

Wrong Answer

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

Submission attempts (in order):
a, b = map(int, input().split())

k =(a+b)/2

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


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

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

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

if abs(b-a)%2==0:
    print(abs(b-a)/2)
else:
    print('IMPSSOIBLE')


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

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


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

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

Submission attempts (in order):
a,b = map(int,input().split())

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

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

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


Verdicts: Wrong Answer

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

Submission attempts (in order):
A, B = [int(x) for x in input().split(" ")]

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


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)

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)


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


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

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


Verdicts: Wrong Answer

Runtime Error

Time Limit Exceeded

Time Limit Exceeded

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

Submission attempts (in order):
x=list(map(int,input().split()))

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
a, b = map(int, input().split())
print((a+b)//2 if (A+B)%2==0 else "IMPOSSIBLE")

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

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


Verdicts: Runtime Error

Runtime Error

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

Submission attempts (in order):
a, b = map(int, input().split())

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

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
N=int(input())
l=list(map(int,input().split()))
l1=sorted(l)
ans=0
for i in range(N):
  if l[i]!=l1[i]:
    ans+=1
if ans==0 or ans==2:
  print('YES')
else:
  print('NO')

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

Verdicts: Runtime Error

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

Submission attempts (in order):
s = input()
A = int(s.split()[0])
B = int(s.split()[1])

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


s = input()
A = int(s.split()[0])
B = int(s.split()[1])

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

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

Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
a, b = map(int, input().split())
if (a+b) % 2 == 0:
    print((a+b)/2)
else:
    print('IMPOSSIBLE')

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
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')

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

s = a+b

if s % 2 == 1:
    print('IMPOSSIBLE')
else:
    print(int(s/2))

Verdicts: Wrong Answer

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

Submission attempts (in order):
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")

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

Verdicts: Runtime Error

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

Submission attempts (in order):
A,B=map(int(input.split()))

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

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

Submission attempts (in order):
num=input().split()
A=int(num[0])
B=int(num[1])
if A==B:
    print(0)
elif (A+B)%2==0:
    print((A+B)/2)
else:
    print("IMPOSSIBLE")

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
import numpy as np

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

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

import numpy as np

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

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
n = int(input())
ps = map(int, input().split())

swap = 0
done = False
ok = True
for i in range(n):
    p = next(ps)
    if p != i+1:
        if done:
            ok = False
            break
        elif swap != 0:
            if swap == i+1:
                done = True
                swap = 0
            else:
                ok = False
                break
        else:
            swap = p

if ok:
    print("YES")
else:
    print("NO")


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

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

Verdicts: Runtime Error

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

Submission attempts (in order):
a,b=map(int,input().split())
if a=b:
  print(0)
elif (a+b)%2==0:
  print((a+b)//2)
else:
  print('IMPOSSIBLE')

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


Verdicts: Runtime Error

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

Submission attempts (in order):
a, b = map(int, input().split(' '))
diff = b - a
if diff % 2 == 0:
  print(diff // 2)
else:
  print('IMPOSSIBLE')

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
a, b = map(int, input().split())

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


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

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


Verdicts: Wrong Answer

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

Submission attempts (in order):
# -*- coding: utf-8 -*-
"""
Created on Sun Jul 28 15:26:59 2019

@author: sp8783
"""

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

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

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

@author: sp8783
"""

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

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

Verdicts: Wrong Answer

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

Submission attempts (in order):

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


if(type(k)=="float"):
    print("IMPOSSIBLE")
elif(type(k)=="int"):
    print(k)

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

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
import sys
 
data = sys.stdin.readline()
 
a, b = data.strip().split()
 
if a == b:
    print(0)
else:
  k = (a + b) / 2
  if k.is_integer():
    print(k)
  else:
    print('IMPOSSIBLE')

import sys

data = sys.stdin.readline()

a, b = data.strip().split()

if a == b:
  return 0
else:
  k = (a + b) / 2
  if k.is_integer():
    return k
  else:
    return 'IMPOSSIBLE'



a, b = (int(x) for x in input().split()) 
if a == b:
    print(0)
else:
  k = (a + b) / 2
  if k.is_integer():
    print(int(k))
  else:
    print('IMPOSSIBLE')

Verdicts: Runtime Error

Runtime Error

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

Submission attempts (in order):
a = list(map(int, input().split()))

re = abs(a[0] - a[1])

for i in range(a[0] - a[1]):
  if abs(a[0] - i) == abs(a[1] - i):
    print(i)
    yes = 1
    break

if yes != 1:
  print('IMPOSSIBLE)

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

b = a[0] + a[1]

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

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

re = abs(a[0] - a[1])

for i in range(a[0] - a[1]):
  if abs(a[0] - i) == abs(a[1] - i):
    print(i)
    yes = 1
    break

if yes != 1:
  print('IMPOSSIBLE')

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

re = abs(a[0] - a[1])
yes = 0
for i in range(a[0] - a[1]):
  if abs(a[0] - i) == abs(a[1] - i):
    print(i)
    yes = 1
    break

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

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

b = a[0] + a[1]

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

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

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

Submission attempts (in order):
a,b = list(map(int,input().split()))
if abs(a-b)%2 == 0:
  print(abs(a-b)%2)
else:
  print("IMPOSSIBLE")

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

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

Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
A,B=map(int,input().spliy())
if (A+B)%2==0:
  print((A+B)//2)
else:
  print('IMPOSSIBLE')


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

Verdicts: Runtime Error

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

Submission attempts (in order):
a, b = map(int, raw_input().split())
if (a + b) % 2 == 0:
  print((a + b) // 2)
else:
  print("IMPOSSIBLE") 

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

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


Verdicts: Runtime Error

Runtime Error

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

Submission attempts (in order):
A,B = list(map(int,input().split()))
if (A+B)%2==1:
  print('IMPOSSIBLE')
else:
  print((A+B)/2)

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

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


Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
input_arr = [input() for i in range(2)]
N = input_arr[0]
p_arr = input_arr[1].split(' ')

k = 0
for i in range(len(p_arr)):
    if int(p_arr[i]) == i + 1:
        pass
    else:
        k += 1
if k < 2:
    print("YES")
else:
    print("NO")

input_arr = [input() for i in range(2)]
N = input_arr[0]
p_arr = input_arr[1].split(' ')

for i in range(len(p_arr)):
    k = 0
    if int(p_arr[i]) == i + 1:
        pass
    else:
        k += 1
print(k)
if k < 2:
    print("YES")
else:
    print("NO")

A, B = int(input()), int(input())




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

input_arr = input().split(" ")
A = int(input_arr[0])
B = int(input_arr[1])




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

Verdicts: Runtime Error

Runtime Error

Runtime Error

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

Submission attempts (in order):
A,B = map(int,input().split())

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


A,B = map(int,input().split())
K =nA + B

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


A,B = map(int,input().split())
K =nA + B

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


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

if K % 2 == 0:
    print(K/2)

else:
    print("IMPOSSIBLE")

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

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

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

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


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

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


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

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

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

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

Submission attempts (in order):
a, b = map(int, input().split())
if (a + b) % 2 == 0 :
  print ((a + b) / 2)
else :
  print ("IMPOSSIBLE)

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

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

Verdicts: Runtime Error

Wrong Answer

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

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

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
k = sum(list(map(int, input().split())))/2
if k % 1:
    print('IMPOSSIBLE')
    exit()
print(k)

k = sum(list(map(int, input().split())))/2
if k % 1:
    print('IMPOSSIBLE')
    exit()
print(int(k))

Verdicts: Wrong Answer

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

Submission attempts (in order):
N = list(map(int, input().split()))
A = max(N) + min(N)

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


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

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

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

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

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

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

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

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


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

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

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

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


Verdicts: Wrong Answer

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

Submission attempts (in order):
num = input().split()
a = int(num[0])%2
b = int(num[1])%2
if a!=b: print('IMPOSSIBLE')
else: print((a+b)/2)

num = input().split()
if int(num[0])+int(num[1])%2!=0:
  print('IMPOSSIBLE')
else:
  print(int(num[0])+int(num[1])//2)

num = input().split()
a = int(num[0])%2
b = int(num[1])%2
if a!=b: print('IMPOSSIBLE')
else: print((int(num[0])+int(num[1]))/2)

num = input().split()
a = int(num[0])%2
b = int(num[1])%2
if a!=b: print('IMPOSSIBLE')
else: print((int(num[0])+int(num[1]))//2)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

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

Submission attempts (in order):
if (A + B) % 2:
    print('IMPOSSIBLE')
else:
    print((A + B) // 2)


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


Verdicts: Runtime Error

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

Submission attempts (in order):
a,b=map(int, input().split())
print(int((a+b)/2) if (a+b)/2%2==0 else "IMPOSSIBLE")

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

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

Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
A=input("")
B=input("")

A=int(A)
B=int(B)

K=0
Ans=0
for K in range(-100000,100000,1):
    if abs(A-K)==abs(B-K):
        print(K)
        Ans=K
        break
if Ans==0:
    print("impossible")

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

K=(A+B)/2
print(int(K) if int(K)==K else "IMPOSSIBLE")

Verdicts: Runtime Error

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

Submission attempts (in order):
A,B = map(int,input().split())
k = int(A+B)
if k%2 == 0:
    print(k/2)
else:
    print("IMPOSSIBLE")

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
A,B = map(int, input().split())

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


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

print( (A+B)/2 if type((A+B)/2) =int else 'IMPOSSIBLE')

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

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


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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

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

Submission attempts (in order):
a,b = map(int,input().split())
if (a+b)%2 == 0:
  print((a+b)%2)
else:
  print('IMPOSSIBLE')

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


Verdicts: Wrong Answer

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

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

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

Verdicts: Wrong Answer

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

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

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
A, B = list(map(int, input().split()))
resutl = (A+B)/2 if (A+B)%2 == 0 else "IMPOSSIBLE"
print(result)

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

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


Verdicts: Runtime Error

Wrong Answer

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

Submission attempts (in order):
A, B = input().split()
A = int(A)
B = int(B)
add = A + B

if add % 2 == 0:
	result = int(add / 2)
	print(result)
	abs_result = abs(A - result)
	print('|{}-{}| = {} and |{}-{}| = {}, so {} satisfies the condition.'.format(A, result, abs_result, B, result, abs_result, result))
else:
	print('IMPOSSIBLE')
	print('No integer satiesfies the condition.')

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
A,B = map(int,input().split())

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

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

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
a,b=map(int,input().split())
if (a + b) % 2 != 0:
    print('IMPOSSIBLE')
else:
    print((a + b)/2)

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

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

Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
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")

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


Verdicts: Runtime Error

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

Submission attempts (in order):
import math
a,b=map(int,input().split())
k=abs((a-b)/2)  
k1=math.trunc(k)
if (k-k1)==0 and k!=0:
    print(int(k))
else:
    print('IMPOSSIBLE')

import math
a,b=map(int,input().split())
k=abs((a-b)/2)
k1=math.trunc(k)
if (k-k1)==0:
    print(int(k))
else:
    print('IMPOSSIBLE')

import math
a,b=map(int,input().split())
k=abs((a-b)/2)
k1=math.trunc(k)
if (k-k1)>0:
    print('IMPOSSIBLE')
else:
    print(k)

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

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

Submission attempts (in order):
a,b = map(int, input().split())

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

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

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

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

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

if ((a%2==0)and(b%2==1)) or ((a%2==1)and(b%==0)):
    print("IMPOSSIBLE")

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

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

elif ((a%2==0)and(b%2==0)):
    c =(a+b)/2
    print(int(c))

else:
    print("IMPOSSIBLE")

Verdicts: Wrong Answer

Runtime Error

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

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

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


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

Verdicts: Runtime Error

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

Submission attempts (in order):
a  = list(map(int, input().split()))
b = abs(a[0] - a[1])

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

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
A,B = map(int,input().split())
answer=(A+B)/2

if (A-B)%2==0:
  print(answer)
else:
  print('IMPOSSIBLE')


import math
A,B = list(map(int,input().split()))

K = (A+B)/2

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
A,B = map(int,input().split())

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

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

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
a, b = map(int, input().split())
if a + b % 2 == 0:
    print(a + b // 2)
else:
    print("IMPOSSIBLE")


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


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


Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
a,b = list(map(int, input().split()))
if (a+b)%2==0:
    print(-(a+b)/2)
else:
    print('IMPOSSIBLE')


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

    

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


Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
A , B = map(int , input().split())

# A**2 - 2AK + K**2 = B**2 - 2BK + K**2
# 2(B - A)K = B**2 - A**2


K = (A + B) / 2


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

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

# A**2 - 2AK + K**2 = B**2 - 2BK + K**2
# 2(B - A)K = B**2 - A**2


K = (A + B) / 2


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

Verdicts: Wrong Answer

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

Submission attempts (in order):
# -*- coding: utf-8 -*-

inputAB = input()
inputAB.split()

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

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


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

# -*- coding: utf-8 -*-

inputAB = input()
inputAB.split()

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

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


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

# -*- coding: utf-8 -*-

inputAB = input().split()

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



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

# print(largeNum, smallNum)

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



Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
a = input().split()
b = a[0] + a[1]
if b%2 == 0:
  print(b/2)
else:
  print('IMPOSSIBLE')

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

i = int(input())
l = list(map(int, input().split()))
s = sorted(l)
f = 0

for n in range(i):
    if l[n] == n+1:
        continue
    else:
        f = f + 1
        continue
print(f)
if f == 2:
    print('YES')
elif f == 0:
    print('YES')
else:
    print('NO')

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

Verdicts: Runtime Error

Wrong Answer

Runtime Error

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

Submission attempts (in order):
a, b = list(map(int, input().split()))

k = (a+b) / 2

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


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

k = (a+b) / 2

if k == int(k):
    print(k)
else :
    print('IMPOSSIBLE')


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

def calc(a, b):
    # a < b
    c = b - a
    if c % 2 == 0:
        return (c/2) + a
    return 'IMPOSSIBLE'
if a < b:
    print(calc(a, b))
else:
    print(calc(b, a))


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

k = (a+b) / 2

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


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

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

Submission attempts (in order):
a, b = map(int, input().split())

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

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

a, b = [int(d) for d in input().split()]

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
A, B = map(int, input().split())
if (A+B)%2==0:
  print((A+B)/2)
else:
  print('IMPPOSSIBLE') 


A, B = map(int, input())
if (A+B)%2==0:
  print((A+B)/2)
else:
  print('IMPPOSSIBLE') 

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

Verdicts: Wrong Answer

Runtime Error

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

Submission attempts (in order):
a,s=map(int,input().split())
if a%2==b%2:
  print((a+s)//2)
alse:
  print("IMPOSSIBLE")

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

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


Verdicts: Runtime Error

Runtime Error

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

Submission attempts (in order):
n=int(input())
a+=list(map(int,input().split()))
c=0
for i in range(n-1):
  if a[i]!=i+1:
    c+=1
print("YES" if c<3 else "NO")
  


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

Verdicts: Runtime Error

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

Submission attempts (in order):
a,b = (int(x) for x in input().split(' '))

c = math.fabs(a)
d = math.fabs(b)
f = (c + b) % 2

if f = 0:
  print((c+b)/2)
if f >0:
  print('IMPOSSIBLE')

import math
a, b = (int(x) for x in input().split(' '))

a = abs(a)
b = abs(b)

c = a + b

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

Verdicts: Runtime Error

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

Submission attempts (in order):


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

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

print(k)


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

b_rest = [max(b[0]-a[0],0)]
a_rest = [max(a[0]-b[0],0)]

for i in range(1, n-1):
  b_rest.append( min(b[i], max( ((b[i]+b_rest[i-1])-a[i]), 0 ) ) )
  a_rest.append( max( a[i]-(b[i]+b_rest[i-1]), 0 ) ) 

a_rest.append(max(0, (a[n-1]-b_rest[-1]) ) )
ans = sum(a) - sum(a_rest)
                                
print(ans)



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

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

print(k)


Verdicts: Wrong Answer

Runtime Error

Accepted