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

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

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

c=a-b

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

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

c=a-b

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


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

def shou(a):
    for i in range(len(a)-1):
        if a[i]>a[i+1]:
            return -1
    return 1

f=0
for i in range(n):
    for j in range(n):
        tmp=a[i]
        a[i]=a[j]
        a[j]=tmp
        if shou(a)==1:
            f=1
        tmp=a[i]
        a[i]=a[j]
        a[j]=tmp
if f>0:
    print('YES')
else:
    print('NO')
    


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

p,q = input().split()
a,b = (int(p),int(q))
if a == b:
    print('IMPOSSIBLE')
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):
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):
inputA,B = input().split()
a = int(A)
b = int(B)
K = (a+b)/2
if K == int(K):
  print(int(K))
else:
  print('IMPOSSIBLE')

A,B = input().split()
a = int(A)
b = int(B)
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):
N = int(input()) 
s = list(map(int, input().split()))
A = 0
for i in range (N):
  if s[i] == i:
    continue
  else:
    A+=1
if A <= 2 or:
  print('YES')
else:
  print('NO')

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

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)&1:print("IMPOSSIBLE")
else:print(min(a,b)+abs(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())

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(abs((a+b)/2))

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

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

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

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

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

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

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

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(abs(int((A-B)/2)) if (A-B)%2==0 else '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)
if s%2==0:
    print(s/2)
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())
s = a+b
if s%2==0:
    print(s//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(abs((a-b)/2)+min(a,b))
else:
    print("IMPOSSIBLE")

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

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

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

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

if A % 2 != B % 2:
  K = "IMPOSSIBLE"
elif A > B:
  
  # 2K = A + B
  K = int((A + B) / 2)
else:
  
  # 2K = B - A
  K = int((B - A) / 2)
print(K)
  

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

if A % 2 != B % 2:
  K = "IMPOSSIBLE"
elif:
  
  # 2K = A + B
  K = int((A + B) / 2)
print(K)
  

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

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

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

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

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

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


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


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 % 2 == b % 2:
  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")

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())
# n=int(input())
# n=input()
a,b=[int(s) for s in input().split()]
ans=(a-b)/2
if ans==int(ans):
    print(int(ans))
else:
    print('IMPOSSIBLE')

# a,b=map(int,input())
# n=int(input())
# n=input()
a,b=[int(s) for s in input().split()]
ans=(a-b)/2
if ans==int(ans):
    print(ans)
else:
    print('IMPOSSIBLE')

# a,b=map(int,input())
# n=int(input())
# n=input()
a,b=[int(s) for s in input().split()]
ans=(a+b)/2
if ans==int(ans):
    print(int(ans))
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())

k = (A+B)/2

if k.is_integer():
    print(k)
else:
    k = -(A+B)/2
    if k.is_integer():
        print(k)
    else:
        print("IMPOSSOBLE")



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

k = (A+B)/2

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

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

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

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

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

else:
  if a > b:
    k = b + (a-b)/2
    print(int(k))
  else:
    k = a + (b-a)/2
    print(int(k))

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('IMPOEEIBLE')
else:
  print(abs(A-B)//2)

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

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

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

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

a,b=map(int, input().split())
if (a+b)%2==0:
  print('{:.0f}'.format((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('IMPOSSIBLE')
else:
  print(abs(x - a))

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

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

S=input()
l=len(S)
nhatena=0
for s in S:
    if s != '?':
        break
    nhatena += 1

min = 10**(l-1-nhatena)
max = 10**(l)-1

# print(min)
# print(max)

mink = int((min - 5) /13) + 1 if not ((min - 5) /13.0).is_integer() else int((min - 5) /13)
maxk = int((max - 5) / 13) + 1 if not ((max - 5) /13.0).is_integer() else int((max - 5) /13)

# print(mink)
# print(maxk)

cnt=0
for k in range(mink, maxk):
    v = 13 * k + 5
    val = ("%0" + str(l) + "d") % (v)
    
    for i,s in enumerate(S):
        if s != '?':
            if s != val[i]:
                break
    else:
        cnt += 1

    if cnt == 1000000007:
        cnt = 0

print(cnt)


a, b = input().split()
a = int(a)
b = int(b)
k = (a + b) / 2.0

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

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)

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



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

print ((a+b)/2)



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

Verdicts: Wrong Answer

Runtime Error

Runtime Error

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

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

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

if abs(a+b)%2 == 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):
N = int(input())
mnstr = list(map(int, input().split()))
yusha = list(map(int, input().split()))
sum = 0
killed = 0

for i in range(N):
  killedtemp1 = min(mnstr[i], yusha[i])
  yusha[i] = max(0, yusha[i]-mnstr[i])
  killedtemp2 = min(mnstr[i+1], yusha[i])
  mnstr[i+1] = mnstr[i+1] - killedtemp2
  killed += killedtemp1 + killedtemp2
  
print(killed)
  

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

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

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

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

A, B = 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())
c = abs(a - b)
if c % 2 == 0:
    print(c // 2)
else:
    print("IMPOSSIBLE")


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

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

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


if __name__ == "__main__":
    main()



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


if __name__ == "__main__":
    main()


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

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

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

for k in range(max(A, B)):
  if abs(A - k) == abs(B - k):
    print(k)
    return
    
print("IMPOSSIBLE")

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


Verdicts: Wrong Answer

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()) 
if (A % 2) == (B % 2):
  print(abs((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

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


a,b=map(int,input())
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 = 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(int((A + B) / 2))

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().strip()
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')

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((a+b)/2)

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

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

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


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

print(round(ans/2) if ans % 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):
List = list(map(int,input().split()))

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

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

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

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

Flag = False
if (A + B) % 2 == 0:
    K = int((A + B)/2)
    Flag = True

if Flag == True:
    print(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 or (a+b)%2==0):
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")

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


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


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

        print('IMPOSSIBLE')


if __name__ == "__main__":
    main()



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


if __name__ == "__main__":
    main()




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

w = ( A + B )

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

x = eval(input().replace(' ','+'))
print(x%2 * 'IMPOSSIBLE' or 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):
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())
K = int((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(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())
ans = (a+b)/2

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

n = int(input())
p = list(map(int,input().split()))
N = list(range(1,n+1))
c = []
a = 0
for i in N:
  if N[i-1] != p[i-1]:
    a += 1
if a == 2 or a==0:
  print("YES")
else:
  print("NO")

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



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

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

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

A= list(map(int,input().split()))
if (A[0]+A[1])//2 == 0:
    print(abs(A[0]-(A[0]+A[1])/2))
else:
    print('IMPOSSIBLE')

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

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):
N = int(input())

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


A, B = map(int, input().split(' '))
ans = (A + B) / 2
print(int(ans)) if ans == int(ans) 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^2 - B^2)/(2*(A-B))
if type(K) == int:
  print(K)
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())

K = (A+B) / 2

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

import numpy as np

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

K = (A+B) / 2

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

import numpy as np

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

K = (np.abs(A)+np.abs(B)) / 2

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

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

K = (A+B)

if K%2 != 0:
    result = "IMPOSSIBLE"
else:
    result = int(K/2)
    
print(result)
        

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())
c = B**2-A**2
if c % 2== 1:
  print('IMPOSSIBLE')
else:
  print(c/(2*(B-A)))

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

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

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

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

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:
    print((A+B)/2)

A,B = map(int,input().split())
if A%2 != B%2:
    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())

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

a,b=map(int, input().split())
if (a+b)%2==0:
    print(str((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 = [int(x) for x in input().split()]

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

print("IMPOSSIBLE")

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

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

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


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

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):
from sys import stdin

n = int(stdin.readline().rstrip())
xs = [int(x) for x in stdin.readline().rstrip().split()]
ys = [int(x) for x in stdin.readline().rstrip().split()]

count = 0

for i in range(n):
   r = min(xs[i], ys[i])
   xs[i] -= r
   ys[i] -= r
   count += r
   r = min(xs[i+1], ys[i])
   xs[i+1] -= r
   count += r
   
print(count)

from sys import stdin

A, B = [int(x) for x in stdin.readline().rstrip().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())

buf = a - b

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

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

buf = a - b

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

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

buf = a + b

if buf % 2 == 0:
	print(buf // 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
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")

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

n = abs(a-b)
print("IMPOSSIBLE" if n&1 else n)

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

n = abs(a-b)
print("IMPOSSIBLE" if n&1 else (a+b)/2)

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

n = abs(a-b)
print(n if n&1 else "IMPOSSIBLE")

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

if (A-B)%2 == 0:
  print(abs(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

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: 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%2 == 0 else 'IMPOSSIBLE')

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

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

y=[0]*2

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

K=0

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

x=input().split()

flag=0

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

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

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

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

Verdicts: 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):
# -*- coding: utf-8 -*-
"""
Created on Mon Jul 29 14:29:48 2019

@author: re
"""

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


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

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


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

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


A = input()
B = input()
A = int(A)
B = int(B)
K = (A+B) / 2

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


A = input()
B = input()
A = int(A)
B = int(B)
K = (A+B) / 2
K = int(K)

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

# -*- coding: utf-8 -*-
"""
Created on Mon Jul 29 14:29:48 2019

@author: re
"""

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


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

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

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

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

Verdicts: Runtime Error

Runtime Error

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

num = list(map(int,input().split()))
A = num[0]
B = num[1]

if A%2==0 and B%2==0:
	print((A+B)/2)
	sys.exit()
if A%2==1 and B%2==1:
	print((A+B)/2)
	sys.exit()
print("IMPOSSIBLE" )

import sys

num = list(map(int,input().split()))
A = num[0]
B = num[1]

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('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,imput().split())
if (a+b)%2==1:
  print("IMPOSSIBLE")
else:
  print((a+b)/2)

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


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


Verdicts: Runtime Error

Runtime Error

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

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

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

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

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

Verdicts: 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):
#coding: UTF-8

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

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

print(A, B)
K = (A+B)/2

if(K.is_integer() == True):
    print(int(K))
else:
    print("IMPOSSIBLE")

#coding: UTF-8

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

A = i[0]
B = i[1]
K = (A+B)/2

if(K.is_integer() == True):
    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):
N = int(input())
p = list(map(int,input().split()))
count = 0
for i in range(1,N+1):
    if p[i-1] != i:
        count += 1
    if count >2:
        print('NO')
        exit(0)
print('YES')

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


Verdicts: Runtime Error

Accepted