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())
for K in range(10 ** 9):
    if abs(A - K) == abc(B - K):
        print(K)
    else:
        print("IMPOSSIBLE")

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())
for K in range(10 ** 9):
    if abs(A - K) == abs(B - K):
        print(K)
    else:
        print("IMPOSSIBLE")


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


Verdicts: Runtime Error

Wrong Answer

Wrong Answer

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

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

c,d = map(int,input().split())

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

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

A,B = map(int,input().split())
answer=abs((A+B)/2)

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

A,B = map(int,input().split())
answer=(A+B)/2

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

A,B = map(int,input().split())
answer=int((A+B)/2)

if (A-B)%2==0:
  print(answer)
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 = list(map(int,input().split()))
x = str((a+b)/2)
lis = x.split(".")
syousuu = lis[1]
if syousuu == "0":
  print(x)
else:
  print("IMPOSSIBLE")
  

a,b = list(map(int,input().split()))
x = str((a+b)/2)
lis = x.split(".")
syousuu = lis[1]
if syousuu == "0":
  print(lis[0])
else:
  print("IMPOSSIBLE")
  

Verdicts: Wrong Answer

Accepted
Problem: We have two distinct integers A and B.  Print the integer K such that |A - K| = |B - K|.  If such an integer does not exist, print `IMPOSSIBLE` instead.

Submission attempts (in order):
import numpy as np
s = list(input())
if np.sum(s) % 2 != 0:
    print('IMPOSSIBLE')
print(np.sum(s) % 2)

s = list(input())
print(s)

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

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: We have two distinct integers A and B.  Print the integer K such that |A - K| = |B - K|.  If such an integer does not exist, print `IMPOSSIBLE` instead.

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

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

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

print((a+b)/2)

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

ave = abs(x + y) / 2

if int(ave - int(ave) * 10) == 0:
  print(int(ave))
  exit()
print("IMPOSSIBLE")

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

ave = (x + y) / 2

if int(ave - int(ave) * 10) == 0:
  print(int(ave))
  exit()
print("IMPOSSIBLE")

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

ave = abs(x + y) / 2

if int((ave - int(ave)) * 10) == 0:
  print(int(ave))
  exit()
print("IMPOSSIBLE")

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have two distinct integers A and B.  Print the integer K such that |A - K| = |B - K|.  If such an integer does not exist, print `IMPOSSIBLE` instead.

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


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

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:
    print(int(c/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")

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

step = sum([90*100**i for i in range(len(str(N))//2)])
dance_floor = sum([9*100**i for i in range(len(str(N))//2)])

ans = len(str(N))%2 * (N-step)  +  -1*(len(str(N))%2-1) * dance_floor
print(ans)


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

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

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

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

A, B = list(map(int, input().split()))
C = min(A, B)
for i in range(C):
  if abs(A-i) == abs(B-i):
    print(i)
else:
  print('IMPOSSIBLE')

A, B = list(map(int, input().split()))
C = max(A, B)
for i in range(C):
  if abs(A-i) == abs(B-i):
    print(i)
else:
  print('IMPOSSIBLE')

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

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

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

A,B=(int(x) for x in input().split())
K=(A+B)/2
if abs(A-K) == abs(B-K):
    print(K)
else:
    print('IMPOSSIBLE')

A,B=(int(x) for x in input().split())
A!=B

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

A,B=(int(x) for x in input().split())
K=(A+B)//2
if abs(A-K) == abs(B-K):
    print(K)
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=int(input()).split()
def asf(A,B):
  same_num=(A+B)/2
  k=same_num-min(A,B)
  return k
print(asf(A,B))

A,B=map(int,input().split())
def asf(A,B):
  same_num=(A+B)/2
  if same_num%1==0:
  	k=same_num-min(A,B)
  	return int(k)
  else:
    return "IMPOSSIBLE"
print(asf(A,B))

A,B=map(int,input().split())
def asf(A,B):
  same_num=(A+B)/2
  k=same_num-min(A,B)
  if k%1==0:
  	return k
  else:
    return "IMPOSSIBLE"
print(asf(A,B))

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

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

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

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

Verdicts: Runtime Error

Accepted
Problem: We have two distinct integers A and B.  Print the integer K such that |A - K| = |B - K|.  If such an integer does not exist, print `IMPOSSIBLE` instead.

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

ans = 0

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

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

ans = 0

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

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()))
cnt = 0

for i in range(N-1):
    if A[i]+1 != A[i+1]:
        cnt += 1

if cnt <= 2:
    print("YES")
elif cnt > 3:
    print("NO")

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

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


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

Verdicts: Wrong Answer

Accepted
Problem: We have two distinct integers A and B.  Print the integer K such that |A - K| = |B - K|.  If such an integer does not exist, print `IMPOSSIBLE` instead.

Submission attempts (in order):
A,B = map(int,input().split())
K = (A+B)/2
judge = isinstance(K, float)
if judge:
  print("IMPOSSIBLE")

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

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

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

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

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

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

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


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

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


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

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

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

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

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

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

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

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

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

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

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: We have two distinct integers A and B.  Print the integer K such that |A - K| = |B - K|.  If such an integer does not exist, print `IMPOSSIBLE` instead.

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

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

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

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):
Tmp = []
Tmp = input().rstrip().split(' ')

nA = int(Tmp[0])
nB = int(Tmp[1])

nAns = nA + nB

nTmp = nAns % 2

if nTmp == 1:
  print("IMPOSSIBLE")
else:
  nAns /= 2
  print(nAns)




Tmp = []
Tmp = input().rstrip().split(' ')
 
nA = int(Tmp[0])
nB = int(Tmp[1])
 
nAns = nA + nB
 
nTmp = nAns % 2
 
if nTmp == 1:
  print("IMPOSSIBLE")
else:
  nAns /= 2
  print("%d" %(nAns))
  

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


a,b=[int(i) for i in inpput().split()]
a,b=min(a,b),max(a,b)
c=b-a
if c%2==0:
  print(c//2)
else:
  print("IMPOSSIBLE")

a,b=[int(i) for i in input().split()]
a,b=min(a,b),max(a,b)
c=b+a
if c%2==0:
  print(c//2)
else:
  print("IMPOSSIBLE")


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: We have two distinct integers A and B.  Print the integer K such that |A - K| = |B - K|.  If such an integer does not exist, print `IMPOSSIBLE` instead.

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

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

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

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

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: We have two distinct integers A and B.  Print the integer K such that |A - K| = |B - K|.  If such an integer does not exist, print `IMPOSSIBLE` instead.

Submission attempts (in order):
import sys
# ----------------------------------------------------------------
# Use Solve Function

def solve(lines):
    A,B = map(int, lines.pop(0).split(' '))
    c = abs(A-B)

    if ( c % 2 == 0 ):
        print(c//2)
    else:
        print('IMPOSSIBLE')
        
lines = [x.strip() for x in sys.stdin.readlines()]

#
# solve !!
#
solve(lines)

import sys
# ----------------------------------------------------------------
# Use Solve Function

def solve(lines):
    A,B = map(int, lines.pop(0).split(' '))
    c = abs(A+B)

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

lines = [x.strip() for x in sys.stdin.readlines()]

#
# solve !!
#
solve(lines)

Verdicts: Wrong Answer

Accepted
Problem: We have two distinct integers A and B.  Print the integer K such that |A - K| = |B - K|.  If such an integer does not exist, print `IMPOSSIBLE` instead.

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

a,b = map(int,input().split())
print((a+b)//2 if (a+b)%2 == 0 or a == b 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(i) for i in input().split(' ')]

0<=A
B<=10**9

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

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

0<=A
B<=10**9

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

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

0<=A
B<=10**9

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

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

0<=A
B<=10**9

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

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

0<=A
B<=10**9

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

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

0<=A
B<=10**9

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

Verdicts: Wrong Answer

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

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

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


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

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

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


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

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


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have two distinct integers A and B.  Print the integer K such that |A - K| = |B - K|.  If such an integer does not exist, print `IMPOSSIBLE` instead.

Submission attempts (in order):
A, B = map(int, input().split())
K = (A**2 - B**2) / (2*(A-B))

if round(K,0) == K:
  print(K)
else:
  print("IMPOSSIBLE")

A, B = map(int, input().split())
K = (A**2 - B**2) / (2*(A-B))

if round(K,0) == 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):
import sys
input = sys.stdin.readline

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

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

import sys
input = sys.stdin.readline

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

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


import sys
input = sys.stdin.readline

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

k2 = a+b
if k2 % 2 != 0:
    print("IMPOSSIBLE")
else:
    print(k2//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())
for x in range(A, B):
    if (A - x)**2 == (B - x)**2:
        print(x)
        break
    else:
        print("IMPOSSIBLE")
        break

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

Verdicts: Wrong Answer

Accepted
Problem: We have two distinct integers A and B.  Print the integer K such that |A - K| = |B - K|.  If such an integer does not exist, print `IMPOSSIBLE` instead.

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

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

Verdicts: Wrong Answer

Accepted
Problem: We have two distinct integers A and B.  Print the integer K such that |A - K| = |B - K|.  If such an integer does not exist, print `IMPOSSIBLE` instead.

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

if a % 2 == 0 and b % 2 != 0:
	print('Impossible')
    exit()
if a % 2 != 0 and b % 2 == 0:
  	print('Impossible')
    exit()
print((a + b) // 2)

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

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


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

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):
n = int(input())
p = list(map(int, input().split()))
cnt = 0
check = 0
tmp = 0
for i in range(n-1):
  if p[i+1] - p[i] == 1:
    cnt += 1
  else:
    if check == 0:
      tmp = i + 2
      check += 1
    else :
      if tmp == p[i+1]:
        check += 1
      else :
        cnt += 1

if cnt == n-1 or check == 2 :
  print("YES")
else:
  print("NO")  

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

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

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: We have two distinct integers A and B.  Print the integer K such that |A - K| = |B - K|.  If such an integer does not exist, print `IMPOSSIBLE` instead.

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

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

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

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

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

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

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

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

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

a,b=map(int,input().split());print({a/2+b/2,"IMPOSSIBLE"}[(a+b)%2])

a=sum(input().split());print(a%2*'IMPOSSIBLE'or a//2)

a=sum(map(int,input().split()));print(a%2*'IMPOSSIBLE'or a//2)


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

i = (A+B)/2 

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

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

i = (A+B)/2 

if i % 1 ==0:
    print(int(i))
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())

for i in range(10**9+1):
    if abs(a-i) == abs(b-i):
            print(i)
            break
    elif a<i or b<i and abs(a-i) != abs(b-i):
            print('IMPOSSIBLE')
            break


a, b = map(int,input().split())
x = (a+b)%2
if x == 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):
def ABC_135_A():
    A,B = map(int, input().split())

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

if __name__ == '__main__':

    ABC_135_A()

def ABC_135_A():
    A,B = map(int, input().split())

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

if __name__ == '__main__':

    ABC_135_A()

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

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

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


Verdicts: Runtime Error

Accepted
Problem: We have two distinct integers A and B.  Print the integer K such that |A - K| = |B - K|.  If such an integer does not exist, print `IMPOSSIBLE` instead.

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

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):
import numpy as np

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

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

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

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

count = 0
for i in range(N):
    n_defeat = min(A[i], B[i])
    A[i] -= n_defeat
    B[i] -= n_defeat
    count += n_defeat
    n_defeat = min(A[i + 1], B[i])
    A[i + 1] -= n_defeat
    B[i] -= n_defeat
    count += n_defeat

print(count)

import numpy

A, B = [int(x) for x in input().split(" ")]
if (A - B) % 2 == 0:
    print(abs(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 == 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')

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

Z = (a+b)%2

if Z==0:
    print(Z)
else:
    print("IMPOSSIBLE")

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

Z = (a+b)%2

if Z==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())

Z = (a+b)%2

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








N = int(input())
P = list(map(int, input().split()))




ascending_order = P.sort()




Test_P = P[1:N-1]


ascending_TestP = Test_P.sort()

Check = (abs((P[-1] + P[0]) +1)) 

if P == ascending_order:
    print("YES")
elif Test_P != ascending_TestP:
    print("NO")
else:
    print("YES")

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

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 = map(int, input())
if k = (a+b)/2:
  print(k)
else:
  print('impossible')

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


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

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have two distinct integers A and B.  Print the integer K such that |A - K| = |B - K|.  If such an integer does not exist, print `IMPOSSIBLE` instead.

Submission attempts (in order):
s=input()
l=len(s);mod=10**9+7
dp=[[0]*13 for i in range(l)]
rem=[1,10,9,12,3,4]
for i in range(l)[::-1]:
  dig=i%6
  if s[i]=="?":
    if i==l-1:
      for j in range(10):
        dp[-1][(j*rem[dig])%13]=1
    else:
      for j in range(10):
        for h in range(13):
          dp[i][(h+j*rem[dig])%13]+=dp[i+1][h]
          dp[i][(h+j*rem[dig])%13]%=mod
  else:
    a=int(s[i])
    if i==l-1:
      dp[i][(a*rem[dig])%13]=1
    else:
      for j in range(13):
        dp[i][(j+a*rem[dig])%13]+=dp[i+1][j]
        dp[i][(j+a*rem[dig])%13]%=mod
print(dp[0][5])


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

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

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

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

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

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

s = a+b

if s < 0:
    s = 0-s

print(s)

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

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

s = a+b

if s < 0:
    s = 0-s



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

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


Verdicts: Runtime Error

Accepted
Problem: We have two distinct integers A and B.  Print the integer K such that |A - K| = |B - K|.  If such an integer does not exist, print `IMPOSSIBLE` instead.

Submission attempts (in order):
a, b = map(int, input().split())
diff = a - b
if (diff % 2) == 0:
    ans = int(max(a-(diff/2), b-(diff/2)))
    print(ans)
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 numpy as np

def main():
    MOD=10**9+7

    S = input()
    S = S[::-1]
    N = len(S)
    dp=np.zeros((N+1,13),dtype=np.int)
    dp[0,0]=1

    for i in range(N):
        if S[i]=="?":
            for s in range(10):
                for j in range(13):
                    dp[i+1][(s*(10**i)+j) % 13] += dp[i][j]
                    dp[i+1][(s*(10**i)+j) % 13] %= MOD
        else:
            s=int(S[i])
            for j in range(13):
                dp[i+1][(s*(10**i)+j) % 13] += dp[i][j]
                dp[i+1][(s*(10**i)+j) % 13] %= MOD

    res = dp[N,5]
    print(res%MOD)

if __name__ == '__main__':
    main()


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().split())
K=(A+B)/2
print(K if K==int(K) else 'IMPOSSIBLE')

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

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

sys.setrecursionlimit(10 ** 7)

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

a, b = li()

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

import sys
stdin = sys.stdin

sys.setrecursionlimit(10 ** 7)

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

a, b = li()

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

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 sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, B = list(map(int, sys.stdin.buffer.readline().split()))
    print((abs(A-B))//2 if (abs(A-B))%2 == 0 else 'IMPOSSIBLE')


if __name__ == '__main__':
    main()


import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, B = list(map(int, sys.stdin.buffer.readline().split()))
    print(int(abs(A-(abs(A-B))/2)) if (abs(A-B))%2 == 0 else 'IMPOSSIBLE')


if __name__ == '__main__':
    main()


import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, B = list(map(int, sys.stdin.buffer.readline().split()))
    print((A+B)//2 if (A+B)%2 == 0 else 'IMPOSSIBLE')


if __name__ == '__main__':
    main()


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):
n=[int(i) for i in input().split()]
ans=n[0]+n[1]
if(ans%2==0):
  print(ans)
else:
  print("IMPOSSIBLE")

n=[int(i) for i in input().split()]
ans=n[0]+n[1]
if(ans%2==0):
  print(int(ans/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 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())
div, rem = divmod(abs(A - B), 2)
print("IMPOSSIBLE" if rem else abs(A - div))

A, B = map(int, input().split())
div, rem = divmod(abs(A - B), 2)
print("IMPOSSIBLE" if rem else min(A, B) + div)


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

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

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

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

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

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

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

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

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):
A,B = map(int, input().split())
i = 0
for K in range(A, B):
  if abs(A - K) == abs(B - K):
    print(K," ")
    i = 1
if i == 0:
    print("IMPOSSIBLE")

A,B = list(map(int,input().split()))
a = abs(A+B) % 2
if a == 1:
  print("IMPOSSIBLE")
else:
  print(int(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):
N=int(input())
p=list(map(int, input().split()))
s = [x for x in range(1,N+1) if x!=p[x-1]]
if len(s)<3:
  print("YES")
else:
  print("NO")

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

Verdicts: Runtime Error

Accepted
Problem: We have two distinct integers A and B.  Print the integer K such that |A - K| = |B - K|.  If such an integer does not exist, print `IMPOSSIBLE` instead.

Submission attempts (in order):
a , b = map(int, input().split())
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

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

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

Verdicts: Wrong Answer

Accepted