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

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

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

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

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

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(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((abs(x)+abs(y))//2)
else:
  print('IMPOSSIBLE')

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

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

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

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

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


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

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

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

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

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

List = list(map(int,input().split())) 
List.sort()
K = List[1]-List[0]
if (K%2==0):
  print(List[0]+(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):
ab = input().split()
a = ab[0]
b = ab[1]

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

def main():
    n = int(input())
    ps = [int(x) for x in input().split()]

    dis = []

    for n, p in enumerate(ps):
        if n + 1 != p:
            dis.append(p)

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

main()

if __name__ == '__main__':
    n = int(input())
    ps = [int(x) for x in input().split()]

    dis = []

    for n, p in enumerate(ps):
        if n + 1 != p:
            dis.append(p)

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

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

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

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


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==1 or b%2==1:
  print("impossible")
  exit()
else:
  print((a+b)/2)

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

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

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

Verdicts: Wrong Answer

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

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

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

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

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


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

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

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

import sys

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    [A, B] = string_to_int(inputs[0])
    if (A + B) % 2 != 0:
        return "IMPOSSIBLE"
    else:
        return (A+B) // 2


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)


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


Verdicts: Runtime Error

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

Submission attempts (in order):

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

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

else:
  print((A+B)/2)


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

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

else:
  print((A+B)/2)


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

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

else:
  print(int((A+B)/2))

Verdicts: Wrong Answer

Runtime Error

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

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

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

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

K = (A + B) / 2
if K.is_integer():
    print(K)
else:
    print("IMPOSSIBLE ")

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

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

Verdicts: Wrong Answer

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

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

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

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

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


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

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


Verdicts: Runtime Error

Wrong Answer

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

Submission attempts (in order):
A = int(input())
B = int(input())
C = int((A + B))

if(C%2 == 1):
    print("IMPOSSIBLE")
else:
    K = C / 2
    print(int(K))

A = int(input())
B = int(input())
C = (A + B)

if(C%2 == 1):
    print("IMPOSSIBLE")
else:
    K = C / 2
    print(int(K))

N = int(input())
List = [int(i) for i in input().split()]
count = 0
for j in range(N):
    if(List[j] != j+1):
        count+=1
if(count <= 2):
    print("YES")
else:
    print("NO")


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

if(C%2 == 1):
    print("IMPOSSIBLE")
else:
    K = C / 2
    print(int(K))


Verdicts: Runtime Error

Runtime Error

Runtime Error

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

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

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

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

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

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

Submission attempts (in order):
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
if isinstance((a + b) / 2):
    print((a + b) / 2)
else:
    print("IMPOSSIBLE")


# -*- coding: utf-8 -*-
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):
x=list(input().split())
A=int(x[0])
B=int(x[1])
if A>B:
     k=(A-B)/2
else:
     k=(B-A)/2
if int(k)==k:
     print("%.0f"%k)
else:
     print("IMPOSSIBE")


x=list(input().split())
A=int(x[0])
B=int(x[1])
k=(A+B)/2
if int(k)==k:
     print("%.0f"%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())
ans = (A+B)/2

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

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

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

Verdicts: Wrong Answer

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

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

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

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

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
a ,b = 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):
a,b=map(input())
a=a+b
if (a)%2==0:
  print(a//2)
else:
  print('IMPOSSIBLE')

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

Verdicts: Runtime Error

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

Submission attempts (in order):
N = int(input())
p = list(map(int, input().split()))
err = 0
for i in range(N):
  if p[i]!=i:
    err+=0
if err == 0:
  print("YES")
elif err == 2:
  print("YES")
else:
  print("NO")

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

N = int(input())
p = list(map(int, input().split()))
err = 0
for i in range(N):
  if p[i]!=i:
    err+=0
if err == 0:
  print("YES")
elif err == 2:
  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

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

else:
    print("IMPOSSIBE")

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

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

else:
    print("IMPOSSIBE")

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

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

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

for i in range(0, 10**9):
  if (a-i) == (b-i):
    print(i)
    
print("IMPOSSIBLE")

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

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

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

a, b = (int(i) for i in input().split())
 
if a % 2 != b % 2:
  return "IMPOSSIBLE"
else:
  return int((a+b) / 2)

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

for i in range(0, 10**9):
  if (a-i) == (b-i):
    return i
return "IMPOSSIBLE"




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

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

Verdicts: Time Limit Exceeded

Time Limit Exceeded

Wrong Answer

Wrong Answer

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+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 = int(input())
b = input().split()
for i in range(a):
  b[i] = int(b[i])
  
for i in range(a-1):
  if (b[i] > b[i+1]):
    break
if i == a-2:
  print('YES')
else:
  for j in range(a-1,i,-1):
    if (b[j] < b[j-1]):
      break
  temp = b[i]
  b[i] = b[j]
  b[j] = temp
  for k in range(a-1):
    if (b[k] > b[k+1]):
      break
  if k == a-2:
    print('YES')
  else:
    print('NO')

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

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

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

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

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

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

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

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

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

s = list(map(int, input().split()))
A = s[0]
B = s[1]
result = abs(A - B)
if result % 2 ==0:
    print(int(min(A,B) + result/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('IMPOSSIBLE')
else: print(int((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):
S = input().split()

A = abs(int(S[0]) - int(S[1]))
ans = 0
if A % 2 == 0:
  ans = A / 2 
  print(ans)
else:
  print('IMPOSSIBLE')


S = input().split()

A = abs(int(S[0]) - int(S[1]))
ans = 0
if A % 2 == 0:
  ans = int(A / 2) 
  if int(S[0]) > int(S[1]):
    print(ans + int(S[1]))
  else:
    print(ans + int(S[0]))
else:
  print('IMPOSSIBLE')

Verdicts: Wrong Answer

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

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

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

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


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

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

Verdicts: Wrong Answer

Wrong Answer

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

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

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

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


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


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


a, b = map(int, input().solid())
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: Runtime Error

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):
n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = 0
for i in range(n):
  if a[i]>=b[i]:
    c+=int(b[i])
  else:
    if (a[i]+a[i+1])>=b[i]:
      c+=int(b[i])
      a[i+1]=a[i]+a[i+1]-b[i]
    else:
      c+=int(a[i]+a[i+1])
print(c)

n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = 0
for i in range(n):
  if a[i]>=b[i]:
    c+=int(b[i])
  else:
    if (a[i]+a[i+1])>=b[i]:
      c+=int(b[i])
      a[i+1]=a[i]+a[i+1]-b[i]
    else:
      c+=int(a[i]+a[i+1])
print(c)

N = int(input())
m = list(map(int, input().split()))
b = list(map(int, input().split()))
s = 0
for i in range(N):
  if m[i]<b[i]:
    if (m[i]+m[i+1])>b[i]:
        s += b[i]
        m[i+1] += m[i]-b[i]
    else:
       s += m[i]+m[i+1]
  else:
    s += b[i]
print(s)

N = int(input())
a = list(map(int, input().split()))
b = sorted(a)
k = 0
for i in range(N):
  if a[i] != b[i]:
    k += 1
if k >2 :
  print("NO")
else:
  print("YES")
  


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

Verdicts: 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())
x=(a+b)/2
if x.is_integer()==1:print(x)
else:print("IMPOSSIBLE")

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

a=eval(input().replace(*' +'))
print(a%2*'IMPOSSIBLE'or a//2)

Verdicts: Wrong Answer

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

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

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

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

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


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

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


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

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

Verdicts: Wrong Answer

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

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

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


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


Verdicts: Wrong Answer

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

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

ans = abs(a-b)
M = max(a,b)

if ans%2==0:
    ans/=2
    print(M-ans)
else:
    print("IMPOSSIBLE")

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

ans = abs(a-b)
M = max(a,b)

if ans%2==0:
    ans//=2
    print(M-ans)
else:
    print("IMPOSSIBLE")

Verdicts: Wrong Answer

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

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

A = temp[0]
B = temp[1]

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

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

A = max(temp)
B = min(temp)

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


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

Verdicts: Wrong Answer

Wrong Answer

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

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

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



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

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



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):
cn = int(input())
enm = input().split(" ")
brv = input().split(" ")
taoshita = int(0)

for i in range(0,cn):
    taoshita = taoshita + min(abs(int(brv[i])),abs(int(enm[i])))  
    enm[i] = int(enm[i]) - int(brv[i])
    if int(enm[i]) < 0:
        brv[i] = abs(int(enm[i]))
        enm[i] = 0
        if (int(enm[i+1]) - int(brv[i])) < 0:
            taoshita = taoshita + int(enm[i+1])
            enm[i+1] = 0
        if (int(enm[i+1]) - int(brv[i])) >= 0:
            enm[i+1] = int(enm[i+1]) - int(brv[i])
            taoshita = taoshita + int(brv[i])
print(taoshita)

tmp = input()
fi = int(tmp.split(" ")[0])
se = int(tmp.split(" ")[1])
k = abs(fi + se)/2
mod = abs(fi + se) % 2
if mod == 1:
  print("IMPOSSIBLE")
  else:
  print(k)

tmp = input()
fi = int(tmp.split(" ")[0])
se = int(tmp.split(" ")[1])
k = int(abs(fi + se)/2)
mod = abs(fi + se) % 2
if mod == 1:
  print("IMPOSSIBLE")
else:
  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+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())
if (A+B)%2==0:
    print(int((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:
  print("IMPOSSIBLE")
else:
  print((a+b)//2)

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

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

Verdicts: Wrong Answer

Wrong Answer

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

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

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

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

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

arr = input().split(" ")
A = int(arr[0])
B = int(arr[1])
 
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())

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: We have two distinct integers A and B.  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=sum(list(map(int,input().split())))
if a%2==0:
	print(a/2)
else:
  	print('IMPOSSIBLE')

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

Verdicts: Wrong Answer

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

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

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

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


Verdicts: Wrong Answer

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

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

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

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

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

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

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

k = (a+b)/2

if abs(a-k) == abs(b-k):
    print(k)
else:
    print("IMPOSSIBLE")


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

k = (a+b)//2

if abs(a-k) == abs(b-k):
    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())
i=a+b/2

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

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

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

S = input()

dp = [[0] * 13 for _ in range(len(S) + 1)]
dp[0][0] = 1
mul = 1

for i in range(len(S)):
    x = S[-(i + 1)]
    if x == "?":
        for k in range(10):
            for j in range(13):
                dp[i + 1][(mul * k + j) % 13] += dp[i][j]
                dp[i + 1][(mul * k + j) % 13] %= INF
    else:
        k = int(x)
        for j in range(13):
            dp[i + 1][(mul * k + j) % 13] += dp[i][j]
            dp[i + 1][(mul * k + j) % 13] %= INF
    mul = mul * 10 % 13  

print(dp[len(S)][5])


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=[]
for x in input().split(" "):
    a.append(int(x))

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

a=[]
for x in input().split(" "):
    a.append(int(x))

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

a=[]
for x in input().split(" "):
    a.append(int(x))

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

Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
a, b = map(int, input().split())
ans = -(a*a-b*b)/(2*(b-a))
if type(ans) == int:
    print(ans)

else:
    print('IMPOSSIBLE')

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

elif b > a and (a+b)%2 == 0:
    ans = (b+a)/2
    print(int(ans))
else:
    print('IMPOSSIBLE')

Verdicts: Wrong Answer

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

Submission attempts (in order):
import string
while True:
    try:
        a,b=map(int,input().split())
        if a!=b:
            if str((a+b)/2.0).isdecimal():
                print(int((a+b)/2))
            else:print("IMPOSSIBLE")
        else:print(int(a+b))
    except:break

import string
while True:
    try:
        a,b=map(int,input().split())
        if a!=b:
            if ((a+b)%2)==0.0:
                print(int((a+b)/2))
            else:print("IMPOSSIBLE")
        else:print(int(a+b))
    except:break

Verdicts: Wrong Answer

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

Submission attempts (in order):
n=int(input())
l=list(map(int,input().split()))
count=0
for i in range(1,n+1)
    if l[i-1]!=i:
        count+=1
print("YES" if count==0 or count==2 else "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 == 1:
  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

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


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


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


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted