Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
#ABC154C

n, k = list(map(int,input().split()))
p = list(((int(x)+1)/2) for x in input().split())

ave = 0
j = 0

for i in range(n-k+1):
    temp = p[i:i+k]
    _ave = sum(temp)
    if _ave>=ave:
        ave = _ave
print(ave)

Fixed submission:
#ABC154C

n, k = list(map(int,input().split()))
p = [((int(x)+1)/2) for x in input().split()]

ave = sum(p[0:k])
max = ave
for i in range(n-k):
    ave = ave-p[i]+p[k+i]
    if ave > max:
        max = ave
print(max)

Buggy python submission (verdict: Time Limit Exceeded):
#ABC154C

n, k = list(map(int,input().split()))
p = list(int(x) for x in input().split())

ave = 0
j = 0

for i in range(n-2):
    temp = p[i:i+k]
    _ave = (sum(temp))/k
    if _ave>=ave:
        ave = _ave
        j = i

import numpy as np
d = np.array(p[j:j+k])
kitai = sum((1+d))/2

# 計算量がO(K)を再計算しているため NG
# kitai = 0
# for x in p[j:j+k]:
#     kitai += sum(range(1,x+1))/x

print(kitai)

Fixed submission:
#ABC154C

n, k = list(map(int,input().split()))
p = [((int(x)+1)/2) for x in input().split()]

ave = sum(p[0:k])
max = ave
for i in range(n-k):
    ave = ave-p[i]+p[k+i]
    if ave > max:
        max = ave
print(max)

Buggy python submission (verdict: Time Limit Exceeded):
#ABC154C

n, k = list(map(int,input().split()))
p = list(int(x) for x in input().split())

ave = 0
j = 0
for i in range(n-2):
    temp = p[i:i+k]
    _ave = (sum(temp))/k
    if _ave>=ave:
        ave = _ave
        j = i

kitai = 0
for x in p[j:j+k]:
    kitai += sum(range(1,x+1))/x

print(kitai)
  

Fixed submission:
#ABC154C

n, k = list(map(int,input().split()))
p = [((int(x)+1)/2) for x in input().split()]

ave = sum(p[0:k])
max = ave
for i in range(n-k):
    ave = ave-p[i]+p[k+i]
    if ave > max:
        max = ave
print(max)
Buggy python submission (verdict: Runtime Error):
k,x=map(int.input().split())
if 500*k >= x:
  print('Yes')
else:
  print('No')

Fixed submission:
k,x=list(map(int,(input().split())))
if 500*k >= x:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
x = int(input())
if x == 2:
  print(2)
  
else:
  var = x
  while True:
    for _ in range(2,var):
      if var%_ != 0:
        ind = True
      else:
        ind = False
        break
    if ind == True:
      break  
    else:
      var+=1  
print(var)
      

Fixed submission:
x = int(input())
if x == 2:
  print(2)
  
else:
  var = x
  while True:
    for _ in range(2,var):
      if var%_ != 0:
        ind = True
      else:
        ind = False
        break
    if ind == True:
      break  
    else:
      var+=1  
  print(var)
Buggy python submission (verdict: Runtime Error):
s= input()
 
list=[]
for i in s:
  if i == '0':
    list.append('0')
  elif i == '1':
    list.append('1')
  elif i == 'B':
    list.pop(-1)
print(list)

Fixed submission:
s= input()
 
list=[]
for i in s:
  if i == '0':
    list.append('0')
  elif i == '1':
    list.append('1')
  elif i == 'B':
    if len(list) != 0:
      list.pop(-1)
print("".join(list))

Buggy python submission (verdict: Runtime Error):
s= input()

list=[]
for i in s:
  if i == '0':
    list.append('0')
  elif i == '1':
    list.append('1')
  elif i == 'B':
    list.remove(-1)
print(list)
    

Fixed submission:
s= input()
 
list=[]
for i in s:
  if i == '0':
    list.append('0')
  elif i == '1':
    list.append('1')
  elif i == 'B':
    if len(list) != 0:
      list.pop(-1)
print("".join(list))
Buggy python submission (verdict: Runtime Error):
import sys
INF = 10**9
sys.setrecursionlimit(INF)
import math


def main():
    x, = map(int, open(0).read().split())

    """
    x=a^5-b^5=(a-b)(a^4+a^3b+a^2b^2+ab^3+b^4)
    x//(a-b)=int>0
    a-b>0
    """

    tmp_a = round(x**(1 / 5))
    for i in range(-tmp_a * 2, tmp_a * 2 + 1):
        tmp_bbbbb = i**5 - x
        # print(i, i**5 - x, tmp_bbbbb)
        is_b_positive = True
        if tmp_bbbbb < 0:
            tmp_bbbbb *= -1
            is_b_positive = False
        tmp_b = tmp_bbbbb**(1 / 5)
        if tmp_b == int(tmp_b):
            a = i
            tmp_b = int(tmp_b)
            if is_b_positive:
                b = tmp_b
            else:
                b = -tmp_b
            break

    ans = f'{a} {b}'
    print(ans)
    return(ans)


if __name__ == '__main__':
    main()


Fixed submission:
import sys
INF = 10**9
sys.setrecursionlimit(INF)
import math


def main():
    x, = map(int, open(0).read().split())

    """
    x=a^5-b^5=(a-b)(a^4+a^3b+a^2b^2+ab^3+b^4)
    x//(a-b)=int>0
    a-b>0
    x=O(a^4)
    """

    for i in range(-1000, 1000 + 1):
        for j in range(-i + 1, i):
            if i**5 - j**5 == x:
                a = i
                b = j
                break

    ans = f'{a} {b}'
    print(ans)
    return(ans)


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
import itertools

def main():
    n, *l = map(int, open(0).read().split())
    l.sort()

    ans = 0
    for a, b, c in itertools.permutations(l, 3):
        if c >= a + b:
            continue
        if c <= abs(a - b):
            continue
        ans += 1
    ans = ans // 6
    print(ans)
    return()

if __name__ == '__main__':
    main()


Fixed submission:
import bisect

def main():
    n, *l = map(int, open(0).read().split())
    l = sorted(l, reverse=True)

    ans = 0
    for a_i in range(n-2):
        a = l[a_i]
        b_i = a_i + 1
        c_i = n - 1
        while b_i < c_i:
            b = l[b_i]
            c = l[c_i]
            if a < b + c:
                b_i += 1
                ans += c_i - b_i + 1
            else:
                c_i -= 1
    print(ans)
    return()

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
import bisect

def main():
    n, *l = map(int, open(0).read().split())
    l.sort()

    ans = 0
    for i in range(n-2):
        for j in range(i+1, n-1):
            # a = l[i], b = l[j], c = ?
            # c < a + b
            # max_c = a + b - 1
            # abs(a - b) < c
            # min_c = abs(a - b) + 1
            a = l[i]
            b = l[j]
            c = l[j+1:]
            max_c = bisect.bisect_right(c, a + b - 1)
            min_c = bisect.bisect_left(c, abs(a - b + 1))
            ans += max_c - min_c
    print(ans)
    return()

if __name__ == '__main__':
    main()


Fixed submission:
import bisect

def main():
    n, *l = map(int, open(0).read().split())
    l = sorted(l, reverse=True)

    ans = 0
    for a_i in range(n-2):
        a = l[a_i]
        b_i = a_i + 1
        c_i = n - 1
        while b_i < c_i:
            b = l[b_i]
            c = l[c_i]
            if a < b + c:
                b_i += 1
                ans += c_i - b_i + 1
            else:
                c_i -= 1
    print(ans)
    return()

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n, *l = map(int, open(0).read().split())

    ans = 0
    for i in range(n-2):
        for j in range(i+1, n-1):
            for k in range(j+1, n):
                _l = [l[i], l[j], l[k]]
                if _l[0] >= _l[1] + _l[2]:
                    continue
                if _l[1] >= _l[2] + _l[0]:
                    continue
                if _l[2] >= _l[0] + _l[1]:
                    continue
                ans += 1
    print(ans)
    return()

if __name__ == '__main__':
    main()


Fixed submission:
import bisect

def main():
    n, *l = map(int, open(0).read().split())
    l = sorted(l, reverse=True)

    ans = 0
    for a_i in range(n-2):
        a = l[a_i]
        b_i = a_i + 1
        c_i = n - 1
        while b_i < c_i:
            b = l[b_i]
            c = l[c_i]
            if a < b + c:
                b_i += 1
                ans += c_i - b_i + 1
            else:
                c_i -= 1
    print(ans)
    return()

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
def main():
    a, b = map(int, open(0).read().split())

    ans = max(0, a - b * 2)
    print(ans)
    return()

if __name__ == '__main__':
    main()


Fixed submission:
def main():
    n, = map(int, open(0).read().split())

    ans = ((n+1) // 2) / n
    print(ans)
    return()

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
import bisect

n, m = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]

a.sort()

for i in range(m):
    div_a = a.pop(-1)
    div_a = div_a // 2
    bisect.insort_left(a, div_a)

ans = sum(a)
print(ans)


Fixed submission:
import bisect

n, m = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]


while m > 0:
    a.sort()
    m -= 1
    a[-1] = a[-1] // 2
    for i in range(n-1)[::-1]:
        if m == 0:
            break
        if a[i] > a[-1]:
            m -= 1
            a[i] = a[i] // 2
        else:
            break

ans = sum(a)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import bisect

n, m = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]

a.sort()

for i in range(m):
    div_a = a.pop(-1)
    div_a = div_a // 2
    insert_index = bisect.bisect_left(a, div_a)
    a.insert(insert_index, div_a)

ans = sum(a)
print(ans)


Fixed submission:
import bisect

n, m = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]


while m > 0:
    a.sort()
    m -= 1
    a[-1] = a[-1] // 2
    for i in range(n-1)[::-1]:
        if m == 0:
            break
        if a[i] > a[-1]:
            m -= 1
            a[i] = a[i] // 2
        else:
            break

ans = sum(a)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = input()

ans = 0

while ans <= len(s)//2:
    prev_s = ''
    for i in range(1, len(s)//2+1):
        if s[:i] in s[i:]:
            prev_s = s[:i]
        else:
            ans = max(ans, len(prev_s))
            break
    else:
        ans = max(ans, len(prev_s))
    s = s[1:]
    if len(s) == 1:
        break

print(ans)


Fixed submission:
n = int(input())
s = input()

ans = 0

while ans <= len(s)//2:
    prev_s = ''
    for i in range(ans+1, len(s)//2+1):
        if s[:i] in s[i:]:
            prev_s = s[:i]
        else:
            ans = max(ans, len(prev_s))
            break
    else:
        ans = max(ans, len(prev_s))
    s = s[1:]
    if len(s) == 1:
        break

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = input()

ans = 0

while ans <= len(s)//2:
    for i in range(1, len(s)//2+1):
        if s[:i] in s[i:]:
            if s[:i+1] in s[i+1:]:
                continue
            else:
                ans = max(ans, len(s[:i]))
    s = s[1:]
    if len(s) == 1:
        break

print(ans)


Fixed submission:
n = int(input())
s = input()

ans = 0

while ans <= len(s)//2:
    prev_s = ''
    for i in range(ans+1, len(s)//2+1):
        if s[:i] in s[i:]:
            prev_s = s[:i]
        else:
            ans = max(ans, len(prev_s))
            break
    else:
        ans = max(ans, len(prev_s))
    s = s[1:]
    if len(s) == 1:
        break

print(ans)
Buggy python submission (verdict: Runtime Error):
import sys
import collections

n = int(input())
xy = []
for _ in range(n):
    xy.append([int(i) for i in input().split()])
xy.sort()

cost_list = []
for i in range(n):
    for j in range(i,n):
        if i == j:
            continue
        x_sub = xy[j][0] - xy[i][0]
        y_sub = xy[j][1] - xy[i][1]
        cost_list.append('{},{}'.format(x_sub, y_sub))

cost_dic = collections.Counter(cost_list)
#print(cost_dic)
zero_cost_num = max(cost_dic.values())
#print(zero_cost_num)
ans = n - zero_cost_num

print(ans)


Fixed submission:
import sys
import collections

n = int(input())
xy = []
for _ in range(n):
    xy.append([int(i) for i in input().split()])
xy.sort()

if len(xy) == 1:
    print(1)
    sys.exit()

cost_list = []
for i in range(n):
    for j in range(i,n):
        if i == j:
            continue
        x_sub = xy[j][0] - xy[i][0]
        y_sub = xy[j][1] - xy[i][1]
        cost_list.append('{},{}'.format(x_sub, y_sub))

cost_dic = collections.Counter(cost_list)
#print(cost_dic)
zero_cost_num = max(cost_dic.values())
#print(zero_cost_num)
ans = n - zero_cost_num

print(ans)
Buggy python submission (verdict: Runtime Error):
import sys
import collections

n = int(input())
a = sorted([int(i) for i in input().split()])
# print(a)
top = a.pop(-1)

nega = sorted([i for i in a if i < 0])
posi = sorted([i for i in a if i > 0])
#print(nega,posi)

if len(nega) == 0:
    nega.append(posi.pop(0))

process = []

for _ in range(len(posi)):
    x = nega.pop(0)
    y = posi.pop(0)
    nega.append(x - y)
    process.append([x, y])
x = top
y = nega.pop(0)
process.append([x, y])
x -= y
for _ in range(len(nega)):
    y = nega.pop(0)
    process.append([x, y])
    x -= y
ans = x

print(ans)
for i in range(len(process)):
    print('{} {}'.format(process[i][0], process[i][1]))


Fixed submission:
import sys
import collections

n = int(input())
a = sorted([int(i) for i in input().split()])
# print(a)
top = a.pop(-1)

nega = sorted([i for i in a if i < 0])
posi = sorted([i for i in a if i >= 0])
#print(nega,posi)

if len(nega) == 0:
    nega.append(posi.pop(0))

process = []

for _ in range(len(posi)):
    x = nega.pop(0)
    y = posi.pop(0)
    nega.append(x - y)
    process.append([x, y])
x = top
y = nega.pop(0)
process.append([x, y])
x -= y
for _ in range(len(nega)):
    y = nega.pop(0)
    process.append([x, y])
    x -= y
ans = x

print(ans)
for i in range(len(process)):
    print('{} {}'.format(process[i][0], process[i][1]))

Buggy python submission (verdict: Runtime Error):
import sys
import collections

n = int(input())
a = [int(i) for i in input().split()]

nega = sorted([i for i in a if i < 0])
posi = sorted([i for i in a if i > 0])
#print(nega,posi)

if len(posi) > 0:
    top = posi.pop(-1)
else:
    top = nega.pop(-1)
if len(nega) == 0:
    nega.append(posi.pop(0))

process = []

for _ in range(len(posi)):
    x = nega.pop(0)
    y = posi.pop(0)
    nega.append(x - y)
    process.append([x, y])
x = top
y = nega.pop(0)
process.append([x, y])
x -= y
for _ in range(len(nega)):
    y = nega.pop(0)
    process.append([x, y])
    x -= y
ans = x

print(ans)
for i in range(len(process)):
    print('{} {}'.format(process[i][0], process[i][1]))


Fixed submission:
import sys
import collections

n = int(input())
a = sorted([int(i) for i in input().split()])
# print(a)
top = a.pop(-1)

nega = sorted([i for i in a if i < 0])
posi = sorted([i for i in a if i >= 0])
#print(nega,posi)

if len(nega) == 0:
    nega.append(posi.pop(0))

process = []

for _ in range(len(posi)):
    x = nega.pop(0)
    y = posi.pop(0)
    nega.append(x - y)
    process.append([x, y])
x = top
y = nega.pop(0)
process.append([x, y])
x -= y
for _ in range(len(nega)):
    y = nega.pop(0)
    process.append([x, y])
    x -= y
ans = x

print(ans)
for i in range(len(process)):
    print('{} {}'.format(process[i][0], process[i][1]))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

###商及び余りをsとすると、n=m*s+s=s(m+1)、ただし0<s<m
sum_fav = 0
for s in range(1,n):
  if n%s == 0:
    m = n//s-1
    if s < m:
      #print(m)
      sum_fav += m
    else:
      break
  
print(sum_fav)


Fixed submission:
import math

n = int(input())

###商及び余りをsとすると、n=m*s+s=s(m+1)、ただし0<s<m
sum_fav = 0
for s in range(1,int(math.sqrt(n))+1):
  if n%s == 0:
    m = n//s-1
    if s < m:
      #print(m)
      sum_fav += m
    else:
      break
  
print(sum_fav)
Buggy python submission (verdict: Time Limit Exceeded):
n,k = [int(i) for i in input().split()]
s = [int(i) for i in input()]

num = [0]
which = s[0]
sign = [which]
for i in s:
  if i != which:
    which = 1-which
    num.append(0)
    sign.append(which)
  num[-1] += 1

if k >= len(sign) - sum(sign):
  print(sum([abs(i) for i in num]))
  exit()

#print(num)
#print(sign)

if sign[0] == 0:
  num = [0] + num

if sign[-1] == 0:
  num.append(0)

#print(num)

ans = 0
for i in range(0,len(num),2):
  ans_tmp = sum(num[i:i+2*k+1])
  #print(i,i+2*k,ans_tmp)
  if ans_tmp > ans:
    ans = ans_tmp
    
print(ans)



Fixed submission:
n,k = [int(i) for i in input().split()]
s = [int(i) for i in input()]

num = [0]
which = s[0]
sign = [which]
for i in s:
  if i != which:
    which = 1-which
    num.append(0)
    sign.append(which)
  num[-1] += 1

num_0 = len(sign) - sum(sign)

if k >= num_0:
  print(sum(num))
  exit()

if sign[0] == 0:
  num = [0] + num

if sign[-1] == 0:
  num.append(0)

sum_now = sum(num[0:2*k+1])
ans = sum_now

for i in range(0,len(num),2):
  if i == 0:
    continue
  if i+2*k >= len(num):
    break
  
  plus = num[i+2*k-1]+num[i+2*k]
  minus = num[i-2] + num[i-1]
  diff = plus - minus
  sum_now += diff
  if sum_now > ans:
    ans = sum_now

print(ans)
Buggy python submission (verdict: Runtime Error):
x,y,z,k = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]

'''
a.sort(reverse=True)
b.sort(reverse=True)
c.sort(reverse=True)
'''

sum = []

for i in a:
  for j in b:
    for k in c:
      sum.append(i+j+k)
      
sum.sort(reverse=True)

for i in range(k):
  print(sum[i])

Fixed submission:
x,y,z,k = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]

a.sort(reverse = True)
b.sort(reverse = True)
c.sort(reverse = True)

d = []
for i in a:
  for j in b:
    d.append(i+j)
d.sort(reverse = True)
d = d[:k]

e = []
for i in c:
  for j in d:
    e.append(i+j)
e.sort(reverse = True)

e = e[:k]

for i in e:
  print(i)
Buggy python submission (verdict: Time Limit Exceeded):
a,b=[int(i) for i in input().split()]

c = a
for i in range(a+1,b+1):
  c = c^i
print(c)

Fixed submission:
a,b=[int(i) for i in input().split()]

bin_b = bin(b)[2:]
bit_len = len(bin_b)
bin_a = bin(a)[2:].zfill(bit_len)

ans_bit = []

a_odd = a + (1 - a%2)
odd_num = (b-a_odd)//2 + 1
if odd_num % 2 == 0:
  ans_bit.append('0')
else:
  ans_bit.append('1')

for i in range(1,bit_len):
  keta = bit_len - i - 1
  amari_a = 0
  if bin_a[keta] == '1':
    amari_a = 2**i - a % 2**i
  amari_b = 0
  if bin_b[keta] == '1':
    amari_b = b % 2**i + 1
  
  no_change = amari_a + amari_b
  if no_change % 2 == 0:
    ans_bit.append('0')
  else:
    ans_bit.append('1')
ans = ''.join(ans_bit[::-1])
ans = int(ans,2)

print(ans)
Buggy python submission (verdict: Runtime Error):
import numpy as np

args = [int(i) for i in input().split()]
N = args[0]
P = args[1]

num = 1
i = 2

count = 0
while True:
    if P % i == 0:
        P /= i
        count += 1
    else:
        x = count // N
        num *= i**x
        break

i = 3
while True:
    count = 0
    while True:
        if P % i == 0:
            P /= i
            count += 1
        else:
            x = count // N
            num *= i**x
            i += 2
            break
    if i**N > P:
        break

print(num)


Fixed submission:
N = input()

count = N.count('2')

print(count)
Buggy python submission (verdict: Time Limit Exceeded):
k, s = [int(i) for i in input().split()]

cnt = 0
for x in range(k+1):
	for y in range(k+1):
		for z in range(k+1):
			if x + y + z == s:
				cnt += 1
    
print(cnt)


Fixed submission:
k, s = [int(i) for i in input().split()]

cnt = 0
for x in range(k+1):
	for y in range(k+1):
		z = s - x - y
		if 0 <= z and z <= k:
				cnt += 1
    
print(cnt)
Buggy python submission (verdict: Runtime Error):
import numpy as np
from math import cos, pi
a,b,h,m = map(int, input().split()) 

mangle = 2*pi * (m/60)
hangle = 2*pi * (h/12)
dist = np.sqrt(a**2+b**2 - 2*a*b*cos(magnle- hangle))
print(dist)

Fixed submission:
import numpy as np
from math import cos, pi
a,b,h,m = map(int, input().split()) 

mangle = 2*pi * (m/60)
hangle = 2*pi * (h/12) + (1/6)*pi*(m/60)
dist = np.sqrt(a**2+b**2 - 2*a*b*cos(mangle- hangle))
print(dist)
Buggy python submission (verdict: Runtime Error):
N = int(input())
n = N % 10

if n in [2, 4, 5, 7, 9];
  print("hon")
elif n in [0, 1, 6, 8];
  print("pon")
else;
  print("bon")


Fixed submission:
N = int(input())
n = N % 10
 
if n in [2, 4, 5, 7, 9]:
  print("hon")
elif n in [0, 1, 6, 8]:
  print("pon")
else:
  print("bon")

Buggy python submission (verdict: Runtime Error):
a = int(input())

if 0 < a < 10;
  a = a 
elif 9 < a < 100;
  a = a % 10
else;
  a = a % 100
  
if a = 3;
  print("bon")
elif a = 0 or a = 1 or a = 6 or a = 8;
  print("pon")
else;
  print("hon")

  

Fixed submission:
N = int(input())
n = N % 10
 
if n in [2, 4, 5, 7, 9]:
  print("hon")
elif n in [0, 1, 6, 8]:
  print("pon")
else:
  print("bon")
Buggy python submission (verdict: Runtime Error):
N = int(input())
k = 0
lis = list(range(1, N+1))
for i in range(1, N+1):
  a = int(input())
  if a == lis[i-1]:
    k += 10
  else:
    k += 0
if k >= 10 * (N-2):
  print('YES')
else:
  print('NO')



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

Buggy python submission (verdict: Runtime Error):
A, B = map(int, input().split())

if A > B:
  for i in range(A):
    k = abs(A-i)
    l = abs(B-i)
    if k == l:
      print(i)
  else:
    print('IMPOSSIBLE')

if A < B:
  for in in range(B):
    k = abs(A-i)
    l = abs(B-i)
    if k == l:
      print(i)
  else:
    print('IMPOSSIBLE')

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

Buggy python submission (verdict: Runtime Error):
, B = map(int, input().split())
 
if A > B:
  for i in range(A):
    k = abs(A - i)
    l = abs(B - i)
    if k == l:
      print(i)
  else:
    print('IMPOSSIBLE')
if A < B:
  for i in range(B):
    k = abs(A - i)
    l = abs(B - i)
    if k == l:
      print(i)
  else:
    print('IMPOSSIBLE')
    
      

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

Buggy python submission (verdict: Time Limit Exceeded):
A, B = map(int, input().split())

for i in range(5*10**8):
  k = abs(A - i )
  l = abs(B - i)
  if k == l:
    print(k)
  else:
    print('IMPOSSIBLE')

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

Buggy python submission (verdict: Time Limit Exceeded):
A, B = map(int, input().split())

for i in range(10**9):
  k = abs(A - i)
  l = abs(B - i)
  if k == l:
    print(k)
  else:
    print('IMPOSSIBLE')

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

Buggy python submission (verdict: Runtime Error):
A, B = map(int, input())

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

Fixed submission:
A, B = map(int, input().split())
 
if (A + B)%2 == 0:
  k = (A + B)/2
  print(round(k))
else:
  print('IMPOSSIBLE')
Buggy python submission (verdict: Runtime Error):
i = input()
out = 3*i*i
print(out)

Fixed submission:
i = int(input())
out = 3*i*i
print(out)
Buggy python submission (verdict: Runtime Error):
import math
N = int(input())
D = int(input())
i = N / (2*D + 1)
if 1 <= N <= 20 and 1 <= D <= 20:
    if i > 0:
        i = math.ceil(i)
        print(i)



Fixed submission:
import math
N, D = map(int, input().split())
i = N / (2*D + 1)
if 1 <= N <= 20 and 1 <= D <= 20:
    if i > 0:
        i = math.ceil(i)
        print(i)
Buggy python submission (verdict: Runtime Error):
import statistics
lis = []
for i in range(3):
  a = int(input())
  a = [a]
  lis += a
x = min(lis)
y = statistics.median(lis)
print(x+y)

Fixed submission:
a, b, c = [int(i) for i in input().split()]
d = a + b
e = b + c
f = c + a
print(min(d, e, f))

Buggy python submission (verdict: Runtime Error):
import statistics
lis = []
for i in range(3):
    a = int(input())
    a = [a]
    lis += a
x = min(lis)
y = statistics.median(lis)
print(x+y)


Fixed submission:
a, b, c = [int(i) for i in input().split()]
d = a + b
e = b + c
f = c + a
print(min(d, e, f))