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 (abs(A-B)/2) % 1 != 0:
	print('IMPOSSIBLE')
else:
	print(int(abs(A-B)/2))

A,B = map(int,input().split())
if (abs(A-B)/2) % 1 != 0:
	print('IMPOSSIBLE')
else:
	print(int(min(A,B)+abs(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):
# -*- coding: utf-8 -*-
a, b = map(iint, input().split())

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

# -*- coding: utf-8 -*-
a, b = map(int, input().split())
 
x = a+b
if x%2 == 1:
  print('IMPOSSIBLE')
else:
  print('{}'.format(x//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 = [int(i) for i in input().split()]

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

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

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

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

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

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 = list(map(int, input().split())

if A == B:
    print(1)    
elif A % 2 != B % 2:
    print("IMPOSSIBLE")
else:
    K = (A+B) // 2
    if abs(A-K) == abs(B-K):
        print(K)
    else:
        print("IMPOSSIBLE")

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

if A == B:
    print(1)
    return
    
if A % 2 != B % 2:
    print("IMPOSSIBLE")
    return
else:
    K = (A+B) // 2
    if abs(A-K) == abs(B-K):
        print(K)
        return 
    else:
        print("IMPOSSIBLE")
        return


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

if A == B:
    print(1)
    return
elif A % 2 != B % 2:
    print("IMPOSSIBLE")
    return
else:
    K = (A+B) // 2
    if abs(A-K) == abs(B-K):
        print(K)
        return
    else:
        print("IMPOSSIBLE")
        return


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

out = None
if A == B:
    out = None
elif A % 2 != B % 2:
    out = "IMPOSSIBLE"
else:
    K = (A+B) // 2
    if abs(A-K) == abs(B-K):
        out = K
    else:
        out = "IMPOSSIBLE"

print(out)

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())
print((A + B) // 2) if A % 2 == B % 2 else print("IMPOSSIBLE)

A, B = map(int, input().split())
print((A + B) // 2) if A % 2 == 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())
c=a+b
if c%2==0:
  print(c/2)
else:
  print("IMPOSSIBLE")


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

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


a,b=int(input().split())
c=a+b
if c%2==0:
  print(int(c/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())
c=a+b
if c%2==0:
  print(int(c/2))
else:
  print("IMPOSSIBLE")


Verdicts: Wrong Answer

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 = map(int, input().split())

print(a)
print(b)

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):
print((lambda x:('IMPOSSIBLE' if (x[0]+x[1])%2==1 else (x[0]+x[1])/2))(list(map(int,input().split()))))

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

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):
input_ = input().split()
a = int(input_[0])
b = int(input_[1])

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

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

d = a + b
c = round((a + b) / 2)
if d % 2 == 0:
    if a != b:
        print(c)
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

mod = 10**9+7
p = list(input())
# p = list("?"*10**4)


dp = np.zeros(13, dtype=int)
dp[0] = 1
mul = 1
for key in reversed(p):
    new_dp = np.zeros(13, dtype=int)
    if key == "?":
        for i in range(10):
            for j in range(13):
                new_dp[(j + i * mul) % 13] += dp[j]
                new_dp[(j + i * mul) % 13] %= mod
    else:
        
        for j in range(13):
            new_dp[(j + int(key) * mul) % 13] += dp[j]
            new_dp[(j + int(key) * mul) % 13] %= mod
    dp = new_dp.copy()
    mul *= 10

print(dp[5])



import numpy as np

mod = 10**9+7
p = list(input())
# p = list("?"*10**4)


dp = np.zeros(13, dtype=int)
dp[0] = 1
mul = 1
for key in reversed(p):
    new_dp = np.zeros(13, dtype=int)
    if key == "?":
        for i in range(10):
            for j in range(13):
                new_dp[(j + i * mul) % 13] += dp[j]
                new_dp[(j + i * mul) % 13] %= mod
    else:
        
        for j in range(13):
            new_dp[(j + int(key) * mul) % 13] += dp[j]
            new_dp[(j + int(key) * mul) % 13] %= mod
    dp = new_dp.copy()
    mul *= 10

print(dp[5])


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

ans = (a+b)/2
if ans % 1 == 0:
    print("{}".format((int)(ans)))
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())
l=max(a-b,b-a)
print(min(a,b)+l)

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)


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())
ans=(x+y)/2
if (y-x) % 2 == 0:
  print(ans)
else:
  print("IMPOSSIBLE")

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

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

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

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

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

Verdicts: Wrong Answer

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

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:
  print("IMIMPOSSIBLE")
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

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


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


a,b=map(int,input().split())
ans=abs(a-b)/2
if ans is not int:
  ans="IMPOSSIBLE"
print(ans)

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

# abs(a-k)==abs(b-k)
# a-k+b-k=0 or a-k-b+k=0

# a+b==2k

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

c=a+b

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

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

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

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

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


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

a,b=map(int,input().split())
c=(a+b)/2
if c%1==0:
    print(int(c))
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):
import math
a,b = list(map(int, input().split()))
ab = abs(a-b)
print(int((ab+1)/2) if ab % 2 == 0 else "IMPOSSIBLE")

import math
a,b = list(map(int, input().split()))
ab = abs(a-b)
_max = max(a,b)
print(_max - int(ab/2) if ab % 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):
a, b = int(input())
a, b = int(a), int(b)
if (a + b) % 2 == 0:
  	print((a + b) // 2)
else:
  	print("IMPOSSIBLE")

a, b = input().split()
a, b = int(a), int(b)
if (a + b) % 2 == 0:
  	print("YES")
else:
  	print("NO")

a, b = input().split()
a, b = int(a), int(b)
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=input().split()
num1=int(a[0])
num2=int(a[1])
k=(num1+num2)/2
if  type(k)=="float":
    print("IMPOSSIBLE")
if type(k)=="int":
    print(k)

a=input().split()
num1=int(a[0])
num2=int(a[1])
k=(num1+num2)/int(2)
if  (num1+num2)%int(2)!=0:
    print("IMPOSSIBLE")
if (num1+num2)%int(2)==0:
    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):
A,B=map(int,input().split())
if A-K==-(B-K):
  print(K)
else:
  print("IMPOSSIBLE")


A,B=map(int,input().split())
if (A+B)%2==0:
  C=(A+B)/2
  print(C)
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

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

def Input():
    return mapt(int, input().split(" "))


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

main()

def mapt(fn, *args):
    return tuple(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


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

main()

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())
ans = abs((A-B)/2)
ans2 = abs((A-B)//2)
if ans == ans2:
  print(int(ans))
else:
  print("IMPOSSIBLE")

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

A, B= map(int, input().split())
diff_ba = B-A
if diff_ba % 2 == 0:
  print(A + diff_ba//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 = sorted(map(int, input().split()))

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

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

if (b-a)%2==0:
    print(int((b+a)/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()))
asn = (A + B) /2
if asn.is_integer() == True:
    print(asn)
else:
    print('IMPOSSIBLE')

A , B = (map(int , input().split()))
asn = (A + B) /2
if asn.is_integer() == True:
    print(int(asn))
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())
diff = abs(a-b)
if diff % 2 == 1:
    print("IMPOSSIBLE")
else:
    print(diff // 2)


a, b = map(int, input().split())
if abs(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):
a,b = map(int,input().split())
if a^b:
  print('IMPOSSIBLE')
else:
  print((a+b)//2)


a,b = map(int,input().split())
if (a^b)&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):
a,b = map(int,input().split())                                    │abc136  abc138  abc140  abc142  abc144  abc146  abc148
k = a+b                                                           │abc137  abc139  abc141  abc143  abc145  abc147  python
if k%2:                                                           │(base) rrif@rrif-dynabook-T65-EG:~/document/atcoder$ mkdir abc 13
    print('INPOSSIBLE')                                           │5
else:                                                             │(base) rrif@rrif-dynabook-T65-EG:~/document/atcoder$ rm -r abc
    print(k//2) 

a,b = map(int,input().split())
k = a+b
if k%2:
    print('IMPOSSIBLE')
else:
    print(k//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):
N = int(input())
H = list(map(int,input().split()))
ans ="Yes"
highest = H[0]
for i in range(N-1):
    if H[i+1]<highest-1:
        ans ="No"
        break
    highest = max(highest,H[i+1])

print(ans)

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):
import math 
a,b=(int(x) for x in input().split())
print(a)
print(b)
if(a%2 != b%2):
    print("IMPOSSIBLE")
else:
    k=int (a+b)/2
    print(math.floor(k))

import math 
a,b=(int(x) for x in input().split())
if(a%2 != b%2):
    print("IMPOSSIBLE")
else:
    k=int (a+b)/2
    print(math.floor(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):
ini=input().split()

N=int(ini[0])
K=int(ini[1])

mod=(N+K)%2
if mod==1:
    print("IMPOSSIBLE")
else:
    print((N+K)/2)

ini=input().split()

N=int(ini[0])
K=int(ini[1])

mod=(N+K)%2
if mod==1:
    print("IMPOSSIBLE")
else:
    print(int((N+K)/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().aplit())
if abs(a-c)==abs(b-c):
  print(c)
else:
  print('IMPOSSIBLE')

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


a,b=map(int,input().split())
if abs(a-c)==abs(b-c):
  print(c)
else:
  print('IMPOSSIBLE')


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


a,b=map(int,input().split())
c=(a+b)/2
if (a+b)%2==0:
  print(c)
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

Runtime Error

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

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

a, b = map(int, input().split())
K = (a+b) / 2
if isinstance(K, float):
	print('IMPOSSIBLE')
if isinstance(K, int):
	print(K)

a, b = map(int, input().split())
if (a+b) % 2 != 0:
    print('IMPOSSIBLE')
else:
    print(int((a+b)/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):
str = input()
a = int(str.split(" ")[0])
b = int(str.split(" ")[1])

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

str = input()
a = int(str.split(" ")[0])
b = int(str.split(" ")[1])

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

if((a+b)%2!=0):
  print("IMPOSSIBLE")
else:
  print(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):
# | A - K | = | B - K |
A, B = map(int, input().split())

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

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

# | A - K | = | B - K |
in = raw_input().split()
A = in[0]
B = in[1]

K = (A**2-B**2) / 2 / ( A-B )

# | A - K | = | B - K |
raw = raw_input().split()
A = int(raw[0])
B = int(raw[1])

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

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

# | A - K | = | B - K |
in = raw_input().split()
A = in[0]
B = in[1]

K = (A**2-B**2) / 2 / ( A-B )

if isinstance(K, int):
	print(K)
else
	print("IMPOSSIBLE")

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

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

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

Verdicts: Wrong Answer

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: 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):
  if a[i] != i + 1:
    c+=1
    
if c == 0 or c == 2:
  print('YES')
  
else:
  print('NO')


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

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

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

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 = list(map(int,input().split()))
x = ( a + b )%2
y = (a + b)/2

if x ==0:
    print(y)
else:
    print('IMPOSSIBLE')

a,b = list(map(int,input().split()))
x = ( a + b )%2
y = (a + b)//2

if x ==0:
    print(y)
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)%==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, input().split())
c = (a+b)/2
if (a+b)%2 != 0:
  print('IMPOSSIBLE')
else:
  print(c)

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

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())
diff = abs(a - b)
print(diff // 2 if diff % 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):
a,b=map(int,input(),split(" "))
if a%2 != b%2:
    print("IMPOSSIBLE")
else:
    print((max(a,b)-min(a,b))/2)

a,b=map(int,input().split(" "))
if a%2 != b%2:
    print("IMPOSSIBLE")
else:
    print(int((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())
c = a+b
if c % 2 == 0:
  c = abs(c)
  print(c/2)
else:
  print("IMPOSSIBLE")

a,b = map(int,input().split())
c = a+b
if c % 2 == 0:
  print(int(c/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%1==0:
    print((A+B)/2)
else:
    print("IMPOSSIBLE")

A,B=map(int,input().split())
if ((A+B)/2)%1==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)%1==0:
    print((A+B)//2)
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+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((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

Wrong Answer

Runtime Error

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):
# -*- coding:utf8 -*-

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

# -*- coding:utf8 -*-

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

# -*- coding:utf8 -*-

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

# -*- coding:utf8 -*-

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

# -*- coding:utf8 -*-

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

# -*- coding:utf8 -*-

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

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

a, b = map(int, input().split())
k = int((a+b)/2)
if abs(a-k) == abs(b-k):
    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 = 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(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 % 2 == B % 2 ):
  print((A + B) / 2)
else:
  print("IMPOSSIBLE")

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

Verdicts: Wrong Answer

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

buri


a,b=map(int,input().split())
if a % 2 != b % 2:
  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 = int(input())
b = int(input())
c = a + b
if c % 2:
    print('IMPOSSIBLE')
else:
    print(int(c / 2))

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

a, b = map(int, input().split())
c = a + b
if c % 2:
    print('IMPOSSIBLE')
else:
    print(int(c / 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 = (int(x) for x in input().split())


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

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


a = int(input())
b = int(input())

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

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


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

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


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())
if A+B%2 = 0:
  K=(A+B)/2
  print(K)
else:
  print('impossible')

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

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

A,B=map(int, input().split())
if A+B%2 = 0:
  K=(A+B)/2
  print(K)
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

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((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):
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):
import sys
A,B = map(int,input().split())

if not ( 0 <= A <= 10**9 and 0 <= B <= 10**9 ): sys.exit()

if A % 2 != B % 2:
    print('IMPOSSIBLE')
    sys.exit()
else:
    print((A+B)/2)



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

if not ( 0 <= A <= 10**9 and 0 <= B <= 10**9 ): sys.exit()

if A % 2 != B % 2:
    print('IMPOSSIBLE')
    sys.exit()
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 = [int(i) for i in input().split()]
if (a + b) / 2 % 1 == 0:
  print(int(a + b / 2))
else:
  print("IMPOSSIBLE")

a, b = [int(i) for i in input().split()]
if (a + b) / 2 % 1 == 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)/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):
package main

import (
	"fmt"
)

func main() {
	var A, B int
	fmt.Scan(&A)
	fmt.Scan(&B)
	if (A + B) % 2 == 0 {
		fmt.Println((A + B) / 2)
	} else {
		fmt.Println("IMPOSSIBLE")
	}
}


package main

import (
	"fmt"
	"math"
)

func main() {
	var A, B int
	fmt.Scan(&A)
	fmt.Scan(&B)
	if (A + B) % 2 == 0 {
		fmt.Println((A + B) / 2)
	} else {
		fmt.Println("IMPOSSIBLE")
	}
}


A, B = [int(i) for i in 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 = map(int, input().split())
 
if A % 2 == B % 2:
  print((A+B)/2)
else:
  print('IMPOSSIBLE')

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

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

if (A+B)/2 % 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

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 K % 2 == 0:
    print(int(K))
else:
    print("IMPOSSIBLE")

A,B=map(int,input().split())
K = (A+B)/2
if (A+B) % 2 == 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):
import math
A,B = map(int, input().split())
K = A+B/2
print(K)
if K.is_integer():
    print(math.floor(K))
else:
    print("IMPOSSIBLE")


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


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


import math
A,B = map(float, input().split())
K = A+B/2
if K.is_integer():
    print(math.floor(K))
else:
    print("IMPOSSIBLE")


A,B = map(float, input().split())
K = (A**2-B**2)/(2*(A-B))
if K.is_integer():
    print(K)
else:
    print("IMPOSSIBLE")


import math
A,B = map(float, input().split())
K = (A**2-B**2)/(2*(A-B))
if K.is_integer():
    print(math.floor(0-K))
else:
    print("IMPOSSIBLE")


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


import math
A,B = map(int, input().split())
K = (A**2-B**2)/(2*(A-B))
if K.is_integer():
    print(math.floor(K))
else:
    print("IMPOSSIBLE")

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

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

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

a, b = map(int, input().split(" "))
x = abs(a+b)
if x%2 == 0:
  print(int(x/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-Harmony
X=map(int, input().split())
K=(X[0]+X[1])/2
if (X[0]+X[1])%2==0:
    print(K)
else:
    print("IMPOSSIBLE")

#A-Harmony
X=list(map(int, input().split()))
K=(X[0]+X[1])/2
if (X[0]+X[1])%2==0:
    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):
K=int(input())
X,Y=map(int,input().split())

ispos_X,ispos_Y=True,True
if X<0:
  X=-X
  ispos_X=False
if Y<0:
  Y=-Y
  ispos_Y=False

if K%2==0 and (X+Y)%2==1:
  print(-1)
else:
  xx,yy=0,0
  vec_list=[]
  if K%2==0:
    while((X-xx)+(Y-yy)>2*K):
      if X-xx>K:
        xx+=K
        vec_list.append((K,0))
      elif Y-yy>K:
        yy+=K
        vec_list.append((0,K))
        
    #print(xx,yy,vec_list)
    diff_x=X-xx
    diff_y=Y-yy
    if diff_x+diff_y==K:
      vec_list.append((diff_x,diff_y))
    else:
      buf=2*K-diff_x-diff_y    
      vec_list.append((diff_x+buf//2,K-diff_x-buf//2))
      vec_list.append((-buf//2,K-buf//2))
      
  else:
    while((X-xx)+(Y-yy)>2*K):
      if X-xx>K:
        xx+=K
        vec_list.append((K,0))
      elif Y-yy>K:
        yy+=K
        vec_list.append((0,K))    
        
    #print(xx,yy,vec_list)
    diff_x=X-xx
    diff_y=Y-yy
    if diff_x+diff_y==K:
      vec_list.append((diff_x,diff_y))
    elif (diff_x+diff_y)%2==0:      
      buf=2*K-diff_x-diff_y
      if diff_x<K:
        vec_list.append((diff_x+buf//2,K-diff_x-buf//2))
        vec_list.append((-buf//2,K-buf//2))
      else:
        vec_list.append((K-diff_y-buf//2,diff_y+buf//2))
        vec_list.append((K-buf//2,-buf//2))
    elif diff_x+diff_y<K:
      xx+=diff_x
      yy+=-K+diff_x
      vec_list.append((diff_x,-K+diff_x))
      
      diff_x=X-xx
      diff_y=Y-yy      
      buf=2*K-diff_x-diff_y
      vec_list.append((diff_x+buf//2,K-diff_x-buf//2))
      vec_list.append((-buf//2,K-buf//2))
    else:
      if diff_x<K:
        xx+=diff_x
        yy+=K-diff_x
        vec_list.append((diff_x,K-diff_x))
      elif diff_y<K:
        xx+=K-diff_y
        yy+=diff_y        
        vec_list.append((K-diff_y,diff_y))

      diff_x=X-xx
      diff_y=Y-yy      
      buf=2*K-diff_x-diff_y
      vec_list.append((diff_x+buf//2,K-diff_x-buf//2))
      vec_list.append((-buf//2,K-buf//2))

  
  print(len(vec_list))
  pos_x,pos_y=0,0
  for x,y in vec_list:
    if ispos_X:
      pos_x+=x
    else:
      pos_x-=x
    if ispos_Y:
      pos_y+=y
    else:
      pos_y-=y
      
    print(pos_x,pos_y)

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

else:
  print("IMPOSSIBLE")

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

else:
  print("IMPOSSIBLE")

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

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

a,b=map(int,input().split())
if a%2!=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())
p = A + B
if p % 2 == 0:
    print(p/2)
else:
    print("IMPOSSIBLE")

A,B = map(int,input().split())
p = A + B
if p % 2 == 0:
    print(p//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:
    c = (abs(a) + abs(b))/2
    if type(c) is int:
        print(c)
        return
if a == b:
    print(0)
    return
print("IMPOSSIBLE")


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

a, b = map(int, input().split())
if (abs(a)+abs(b))%2 == 0:
    print(int((abs(a) + abs(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 = map(int, input().split())
sa = max(a,b)-min(a,b)
if sa % 2 != 0:
  print("IMPOSSIBLE")
  print(0000)
else:
  print(min(a,b) + sa%2)
  

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

a,b = map(int, input().split())
sa = max(a,b)-min(a,b)
if sa % 2 != 0:
  print("IMPOSSIBLE")
else:
  print(min(a,b) + sa//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):
input1 = input()

num = input1.split(' ')

num1 = int(num[0])
num2 = int(num[1])

total = num1 + num2

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

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

input1 = input()
 
num = input1.split()
 
num1 = int(num[0])
num2 = int(num[1])
 
total = num1 + num2
 
if total%2 != 0:
	print('IMPOSSIBLE')
else:
	print(int(total/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())

ans = abs(A - B)
if (0 < (ans % 2)):
  print('IMPOSSIBLE')
else:
  print(ans//2)


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

ans = abs(A + B)
if (0 < (ans % 2)):
  print('IMPOSSIBLE')
else:
  print(ans//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 abs(A+B)%2==0:
    print(abs(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):
n = int(input())
xn = [int(x) for x in input().split()]
k = 0
for i in range(1,n+1):
	if xn[i-1] != i:k += 1
        
print("NO" if k > 2 else "YES")

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

diff = abs(A - B)

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


Verdicts: Runtime Error

Accepted