Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p04043 (python)

Fixed submission:
list = list(map(int,input().split()))

if list == [5,5,7]:
    print("YES")
elif list == [5,7,5]:
    print("YES")
elif list == [7,5,5]:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
list = list(map(int,input().split()))

five = 0
seven = 0

for i in list:
  if i == 5:
    five += 1
  elif i == 7:
    seven += 1
  else:
      pass

if seven == 1 and five == 2:
  print(TRUE)
else:
    print(NO)

Buggy submission (verdict: Runtime Error):
n,l = map(int,input().split())
list = []

for i in range(n):
    word = input()
    list.append(word)

list_connect = "".join(sorted(list))


print(list_connect)

Buggy submission (verdict: Runtime Error):
n,l = map(int,input().split())
list = []

for i in range(n):
    word = input()
    list.append(word)

list_connect = "".join(sorted(list))


print(list_connect)

Buggy submission (verdict: Runtime Error):
n,l = map(int,input().split())
list = []

for i in range(n):
    word = input()
    list.append(word)

list_connect = "".join(sorted(list))


print(list_connect)

Buggy submission (verdict: Runtime Error):
list = list(map(int,input().split()))

if list == [5,5,7]:
    print(YES)
elif list == [5,7,5]:
    print(YES)
elif list == [7,5,7]:
    print(YES)
else:
    print(NO)
Problem p02957 (python)

Fixed submission:
g=raw_input().split()
a=int(g[0])
b=int(g[1])
if a%2==b%2:
  print((a+b)/2)
else:
  print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
g=raw_input().split()
a=int(g[0])
b=int(g[1])
if a%2==b%2:
  print((a+b)/2)
else:
  print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
g=raw_input().split()
a=int(g[0])
b=int(g[1])
if a%2=b%2:
  print((a+b)/2)
else:
  print("IMPOSSIBLE")
Problem p03035 (python)

Fixed submission:
[a,b]=map(int,raw_input().split())

if a >= 13:
	print b
elif a >= 6:
	print b/2
else:
	print 0

Buggy submission (verdict: Runtime Error):
[n,m]=map(int,raw_input().split())
l,r=1,n
for i in range(m):
	[li,ri]=map(int,raw_input().split())
	l = max(li, l)
	r = min(ri, r)
ans=l-r+l
print(ans if ans > 0 else 0)

Buggy submission (verdict: Runtime Error):
[r,d,x0]=map(int,raw_input().split())

a = [x0]
for i in range(10):
	a += [r * a[-1] - d]
	print a[-1]
Problem p03085 (python)

Fixed submission:
b = input()
if b == "A":
  b = "T"
elif b == "T":
  b = "A"
elif b == "C":
  b = "G"
elif b == "G":
  b = "C"
print(b)

Buggy submission (verdict: Runtime Error):
b = input()
if b == "A":
  b = "T"
else if b == "T":
  b = "A"
else if b == "C":
  b = "G"
else if b == "G":
  b = "C"
print(b)

Buggy submission (verdict: Runtime Error):
b = input()
if b[i] == "A":
  b[i] = "T"
else if b[i] == "T":
  b[i] = "A"
else if b[i] == "C":
  b[i] = "G"
else if b[i] == "G":
  b[i] = "C"
print(b)

Buggy submission (verdict: Runtime Error):
b = input()
for i in b:
  if b[i] == "A":
    b[i] = "T"
  else if b[i] == "T":
    b[i] = "A"
  else if b[i] == "C":
    b[i] = "G"
  else if b[i] == "G":
    b[i] = "C"
print(b)

Buggy submission (verdict: Runtime Error):
b = input()
for i in b:
  if b[i] == "A":
    b[i] = "T"
  if b[i] == "T":
    b[i] = "A"
  if b[i] == "C":
    b[i] = "G"
  if b[i] == "G":
    b[i] = "C"
print(b)
Problem p03109 (python)

Fixed submission:
date = list(map(int, input().split("/")))
if date[0] >= 2019 and date[1] >= 5:
	print("TBD")
else:
  print("Heisei")

Buggy submission (verdict: Runtime Error):
date = list(map(int, input().split("/")))
if date[0] >= 2019:
	if date[1] >= 5:
		print("TBD")
    else:
      	print("Heisei")
else:
	print("Heisei")

Buggy submission (verdict: Runtime Error):
date = map(int, input().split("/"))
if date[0] > 2019:
	if date[1] > 5:
		print("Heisei")
else:
	print("TBD")
Problem p03238 (python)

Fixed submission:
n = int(input())
if n == 1:
  print('Hello World')
elif n == 2:
  a = int(input())
  b = int(input())
  print(a+b)

Buggy submission (verdict: Runtime Error):
n = int(input())
if n == 1:
  print('Hello World')
elif n == 2:
  a, b = map(int, input().split())
  print(a+b)
Problem p03469 (python)

Fixed submission:
s = list(input().split('/'))
s[0] = '2018'
print('/'.join(s))

Buggy submission (verdict: Runtime Error):
s = input()
s[3] = '8'
print(s)
Problem p03477 (python)

Fixed submission:
weight = list(map(int, input().split()))
if weight[0]+weight[1] > weight[2]+weight[3]:
  print('Left')
elif weight[0]+weight[1] < weight[2]+weight[3]:
  print('Right')
else:
  print('Balanced')

Buggy submission (verdict: Runtime Error):
weight = list(map(int, input().split()))
if a+b > c+d:
  print('Left')
elif a+b < c+d:
  print('Right')
else:
  print('Balanced')
Problem p03485 (python)

Fixed submission:
import math
a, b = map(int, input().split())
x = (a+b)/2
print(math.ceil(x))

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
x = (a+b)/2
print(ceil(x))
Problem p02958 (python)

Fixed submission:
n = int(input())
num_list = list(map(int,input().split()))
sorted_num_list = sorted(num_list)
cnt = 0
for i in range(len(num_list)):
	if num_list[i] != sorted_num_list[i]:
		cnt += 1
if cnt < 3:
	print("YES")
else:
	print("NO")

Buggy submission (verdict: Runtime Error):
n = int(input())
num_list = list(map(int,input()))

sorted_num_list = sorted(num_list)
cnt = 0
for i in range(len(num_list)):
	if num_list[i] != sorted_num_list[i]:
		cnt += 1
if cnt < 3:
	print("YES")
else:
	print("NO")
Problem p03026 (python)

Fixed submission:
n = int(input())
adj_path = [[] for _ in range(n)]
paths = []
for _ in range(n-1):
    a,b = map(int,input().split())
    paths.append([a,b])
    adj_path[a-1].append(b-1)
    adj_path[b-1].append(a-1)
c_list = sorted(list(map(int,input().split())),reverse=True)
out = [0 for i in range(n)]
que = [[0,adj_path[0]]]
visited = []
cnt = 0
while(que):
    node_num,children = que.pop(0)
    visited.append(node_num)
    out[node_num] = c_list[cnt]
    cnt += 1
    for child in children:
        if child not in visited:
            que.append([child,adj_path[child]])
score = 0
for path in paths:
    a,b = path
    score += min(out[a-1],out[b-1])
print(score)
print(" ".join(str(x) for x in out))

Buggy submission (verdict: Runtime Error):
n = int(input())
adj = [[i,0] for i in range(n+1) ]
adj_path = []
for _ in range(n-1):
    a,b = map(int,input().split())
    adj_path.append([a,b])
    adj[a][1] += 1
    adj[b][1] += 1
c_list = sorted(list(map(int,input().split())))
out = [0 for i in range(n+1)]
if len(adj_path) == 0:
    print(0)
    print(" ")
else:
    for i,[name,rank] in enumerate(sorted(adj,key=lambda x:x[1])):
        if name != 0:
            out[name] = c_list[i]
    score = 0
    for a,b in adj_path:
        score += min(out[a],out[b])
    print(score)
    print(" ".join(str(x) for x in out[1:]))
Problem p03106 (python)

Fixed submission:
def gcd(a,b):
    if b==0: 
        return a
    return gcd(b,a%b)

a,b,k = map(int,input().split())
x = gcd(a,b)
list_num = []
for i in range(1,x+1):
    if x % i == 0:
        list_num.append(i)
list_num = sorted(list_num,reverse=True)
print(list_num[k-1])

Buggy submission (verdict: Runtime Error):
import math

a,b,k = map(int,input().split())
x = math.gcd(a,b)
list_num = []
for i in range(1,x+1):
    if x % i == 0:
        list_num.append(i)
list_num = sorted(list_num,reverse=True)
print(list_num[k-1])
Problem p03377 (python)

Fixed submission:
a,b,x = map(int,input().split())

if a <= x and a+b >= x:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):


n = int(input())

number_list = list(map(int,input().split()))
tmp_list = sorted(number_list)


for number in number_list:
    if number < tmp_list[n//2]:
        print(tmp_list[n//2])
    else :
        print(tmp_list[n//2-1])
Problem p03415 (python)

Fixed submission:
n = 3
ans = ""
for i in range(n):
    text = input()
    ans += text[i]

print(ans)

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())

if n==1 and m==1:
    ans = 1
elif n==1 or m==1:
    ans = n*m-2
else:
    ans = (n-2)*(m-2)

print(ans)
Problem p03469 (python)

Fixed submission:
S = input()
S=S.replace("2017","2018")

print(S)

Buggy submission (verdict: Runtime Error):
setting = input().rstrip().split(" ")
N = int(setting[0])
Y = int(setting[1])
otoshidama = [-1,-1,-1]

for x in range(N):
    for y in range(N):
        if 10000*x + 5000*y + 1000*(N-x-y) == Y :
            otoshidama = [x,y,N-x-y]
        else:
            pass

print(otoshidama[0]," ",otoshidama[1]," ",otoshidama[2])

Buggy submission (verdict: Runtime Error):
setting = input().rstrip().split(" ")
N = int(setting[0])
Y = int(setting[1])


for x in range(N):
    for y in range(N):
        if 10000*x + 5000*y + 1000*(N-x-y) == Y :
            otoshidama = [x,y,N-x-y]
        else:
            pass

print(otoshidama[0]," ",otoshidama[1]," ",otoshidama[2])

Buggy submission (verdict: Runtime Error):
S = raw_input()
S.replace("2017","2018")

print(S)

Buggy submission (verdict: Runtime Error):
S = raw.input()
S = S.replace("2017","2018")

print(S)

Buggy submission (verdict: Runtime Error):
S = raw.input()
S.replace("2017","2018")

print(S)
Problem p03471 (python)

Fixed submission:
setting = input().rstrip().split(" ")
N = int(setting[0])
Y = int(setting[1])
A = -1
B = -1
C = -1

for x in range(N+1):
    for y in range(N+1):
        if N-x-y >= 0:
            if 10000*x + 5000*y + 1000*(N-x-y) == Y :
                A , B , C = x ,y,N-x-y
                break
    else:
            continue
    break
print(A," ",B," ",C)

Buggy submission (verdict: Runtime Error):
setting = input().rstrip().split(" ")
N = int(setting[0])
Y = int(setting[1])


for x in range(N):
    for y in range(N):
        if N-x-y >= 0:
            if 10000*x + 5000*y + 1000*(N-x-y) == Y :
                otoshidama = [x,y,N-x-y]
        else:
            pass

print(otoshidama[0]," ",otoshidama[1]," ",otoshidama[2])

Buggy submission (verdict: Runtime Error):
setting = input().rstrip().split(" ")
N = int(setting[0])
Y = int(setting[1])


for x in range(N):
    for y in range(N):
        if 10000*x + 5000*y + 1000*(N-x-y) == Y :
            otoshidama = [x,y,N-x-y]
        else:
            pass

print(otoshidama[0]," ",otoshidama[1]," ",otoshidama[2])
Problem p02958 (python)

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

Buggy submission (verdict: Runtime Error):
N = int(input())
p = map(int, input().split())
count=0
for i in range(N):
    if p[i] == i:
        count+=1
if count<=2 : 
    print("YES")
else:
    print("NO")
Problem p02957 (python)

Fixed submission:
a, b = [int(e) for e in input().split()]
if (a+b)%2==0:
    print(int((a+b)/2))
else:
    print('IMPOSSIBLE')

Buggy submission (verdict: Runtime Error):
a, b = [int(e) for e in input().split()]
if (a+b)%2==0:
    return int((a+b)/2)
else:
    return 'IMPOSSIBLE'
Problem p03037 (python)

Fixed submission:
n,m=map(int,input().split())
 
l=-1
r=10**6
 
for _ in range(m):
  il, ir=map(int,input().split())
  l=max(l,il)
  r=min(r,ir)
  
print(max(0,r-l+1))

Buggy submission (verdict: Runtime Error):
n,m=map(int,input())
 
l=-1
r=10**6
 
for _ in range(m):
  il, ir=map(int,input())
  l=max(l,il)
  r=min(r,ir)
  
print(max(0,r-l+1))

Buggy submission (verdict: Runtime Error):
n,m=map(int,input())

l=-1
r=10**6

for _ in range(m):
  il, ir=map(int,input())
  l=max(l,il)
  r=min(r,ir)
  
print(r-l+1)
Problem p03238 (python)

Fixed submission:
N = input()
N = int(N)

if N == 1:
    print("Hello World")
    
if N == 2:
    A = input()
    B = input()
    A = int(A)
    B = int(B)
    print(A+B);

Buggy submission (verdict: Runtime Error):
N = 0;
A = 0;
B = 0;

input(N);

if N == 1:
    print("Hello World")
    
else:
    input(A);
    input(B);
    print(A+B);
Problem p03229 (python)

Fixed submission:
import numpy as np
N = int(input().strip('\n'))
lis = []
for i in range(N):
    lis.append(int(input().strip('\n')))
lis = np.sort(np.array(lis))
mx_n = lis[-1]
ms_n = lis[0]
lis = lis[1:-1]
point = mx_n-ms_n
while lis.shape[0]>=2:
    mx = lis[-1]
    ms = lis[0]
    point += (mx_n-ms+mx-ms_n)
    mx_n = mx
    ms_n = ms
    lis = lis[1:-1]
if lis.shape[0]==1:
    point += max(abs(mx_n-lis[0]),abs(ms_n-lis[0]))
print(point)

Buggy submission (verdict: Runtime Error):
N = int(input().strip('\n'))
lis = []
for i in range(N):
    lis.append(int(input().strip('\n')))
lis = np.sort(np.array(lis))
mx_n = lis[-1]
ms_n = lis[0]
lis = lis[1:-1]
point = mx_n-ms_n
while lis.shape[0]>=2:
    mx = lis[-1]
    ms = lis[0]
    point += (mx_n-ms+mx-ms_n)
    mx_n = mx
    ms_n = ms
    lis = lis[1:-1]
if lis.shape[0]==1:
    point += max(abs(mx_n-lis[0]),abs(ms_n-lis[0]))
print(point)
Problem p03230 (python)

Fixed submission:
import numpy as np
N = int(input().strip('\n'))
k2 = 1+np.sqrt(1+8*N)
if k2%2==0:
    k=int(k2/2)
    print('Yes')
    print(k)
    yel = [1]
    red = [1]
    for i in range(1,k-1):
        yel.append(yel[i-1]+1+i)
        red.append(red[i-1]+i)
    yel = np.array(yel).astype('int32')
    red = np.array(red).astype('int32')
    print(k-1,*yel)
    print(k-1,*red)
    for i in range(1,k-1):
        fs = np.arange(red[i],red[i]+i).astype('int32')
        sc = red[i:]+i
        fs = np.concatenate((fs,sc))
        print(k-1,*fs)
else:
    print('No')

Buggy submission (verdict: Runtime Error):
import numpy as np
N = int(input().strip('\n'))
k2 = 1+np.sqrt(1+8*N)
if k2%2==0:
    k=int(k2/2)
    print('Yes')
    print(k)
    yel = [1]
    red = [1]
    for i in range(1,k-1):
        yel.append(yel[i-1]+1+i)
        red.append(red[i-1]+i)
    yel = np.array(yel).astype('int16')
    red = np.array(red).astype('int16')
    print(k-1,*yel)
    print(k-1,*red)
    for i in range(1,k-1):
        fs = np.arange(red[i],red[i]+i).astype('int16')
        sc = red[i:]+i
        print(k-1,*fs,*sc)
else:
    print('No')
Problem p02971 (python)

Fixed submission:
import sys
N = int(input())
a = []
for line in sys.stdin.readlines():
  a.append(int(line.strip()))

s = sorted(a, reverse=True)
m0 = s[0]
m1 = s[1]

for aa in a:
  if aa == m0:
    print(m1)
  else:
    print(m0)

Buggy submission (verdict: Runtime Error):
import sys
N = int(input())
a = list(map(int, input()))

s = sorted(a, reverse=True)
m0 = s[0]
m1 = s[1]

for aa in a:
  if aa == m0:
    print(m1)
  else:
    print(m0)

Buggy submission (verdict: Runtime Error):
import sys
N = int(input())
a = list(map(int, input()))

s = sorted(a)
m0 = s[0]
m1 = s[1]

for aa in a:
  if aa == m0:
    print(m1)
  else:
    print(m0)
Problem p02957 (python)

Fixed submission:
a, b = map(int, input().split())

if a < b:
    A = a
    B = b
else:
    A = b
    B = a

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

Buggy submission (verdict: Runtime Error):
N = int(input())
Nlist = [int(i) for i in input().split()]

sum = 0
cnt = 0
for i in range(N):
    if cnt > 2:
        break

    if Nlist[i] == (i + 1):
        continue
    else:
        sum += Nlist[i]
        cnt += 1

if cnt == 0 or sum == (N + 1):
    print("YES")
else:
    print("NO")

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

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

    K = int(B - (B - A) / 2)
    print(str(K))
Problem p02957 (python)

Fixed submission:
import math
a, b = [int(i) for i in input().split()]
r = a - b if a > b else b - a
if r % 2 is 0:
  print(abs(int(r / 2)) + (a if a < b else b))
else:
  print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
import math
a, b = [int(i) for i in input().split()]
r = a - b if a > b else b - a
if r % 2 is 0:
  print(abs(int(r / 2)) + (a if a < b else b))
  else:
    print("IMPOSSIBLE")
Problem p03323 (python)

Fixed submission:
A, B = list(int(a) for a in input().split(" "))
if A <= 8 and B <= 8:
    print("Yay!")
else:
    print(":(")

Buggy submission (verdict: Runtime Error):
A, B = input().split(" ")
if A <= 8 and B <= 8:
    print("Yay!")
else:
    print(":(")
Problem p03610 (python)

Fixed submission:
s = input()
ans = ""
for i in range(len(s)):
  if(i % 2 == 0):
    ans = ans + s[i]
    
print(ans)

Buggy submission (verdict: Runtime Error):
ans = ""
for i in range(len(s)):
  if(i % 2 == 0):
    ans = ans + s[i]
print(ans)

Buggy submission (verdict: Runtime Error):
s = intpu()
ans = ""
for i in range(len(s)):
  if(i % 2 == 0):
    ans = ans + s[i]
print(ans)
Problem p03729 (python)

Fixed submission:
strs = input().split()
if strs[0][len(strs[0]) -1] == strs[1][0] and strs[1][len(strs[1]) -1] == strs[2][0]:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
strs = input().split()
if strs[0][len(strs[0]) -1] == strs[1][0] and strs[1][len(strs[0]) -1] == strs[2][0]:
    print("YES")
else:
    print("NO")
Problem p03737 (python)

Fixed submission:
str = input()
strs = str.split(" ")
ans = ""
for str in strs:
    ans = ans+str[0].upper()
print(ans)

Buggy submission (verdict: Runtime Error):
def alice(x, y):
    return turn(x, y)

def brown(x, y):
    return turn(x, y)

def turn(x, y):
    a = 0
    if x < y or x == y:
        a = y / 2
        y = y - a * 2
        x = x + a
    else:
        a = x / 2
        x = x - a * 2
        y = y + a
    if a == 0:
        return [False, x, y]
    return [True, x, y]

nums = input().split(" ")
x = int(nums[0])
y = int(nums[1])
while True:
    result, x, y = alice(x, y)
    if result == False:
        print('Brown')
        break
    result, x, y = brown(x, y)
    if result == False:
        print('Alice')
        break

Buggy submission (verdict: Runtime Error):
x, y = input().split(" ")
while():
    if alice() == False:
        print('Brown')
        break
    if brown() == False:
        print('Alice')
        break


def turn():
    a = 0
    if x < y or x == y:
        a = y / 2
        y = y - a * 2
        x = x + a
    else:
        a = x / 2
        y = x - a * 2
        x = y + a
    if a == 0:
        return False
    return True

def alice():
    return turn()

def brown():
    return turn()
Problem p02957 (python)

Fixed submission:
L,R = map(int,input().split())

ans = (L+R)/2

if ans.is_integer():
  print(int(ans))
else:
  print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
L,R = map(int,input().split())

ans = (L+R)/2

if ans.is_integer():
  return int(ans)
else:
  return "IMPOSSIBLE"
Problem p04029 (python)

Fixed submission:
# coding: utf-8
import sys
     
n = int(raw_input())
     
print n*(n+1)/2

Buggy submission (verdict: Runtime Error):
# coding: utf-8
import sys

n = int(row_input())

print n*(n+1)/2

Buggy submission (verdict: Runtime Error):
# coding: utf-8

n = int(row_input())

print n*(n+1)/2
Problem p02957 (python)

Fixed submission:
a, b = (int(x) for x in input().split()) 
if a == b:
    print(0)
else:
  k = (a + b) / 2
  if k.is_integer():
    print(int(k))
  else:
    print('IMPOSSIBLE')

Buggy submission (verdict: Runtime Error):
import sys
 
data = sys.stdin.readline()
 
a, b = data.strip().split()
 
if a == b:
    print(0)
else:
  k = (a + b) / 2
  if k.is_integer():
    print(k)
  else:
    print('IMPOSSIBLE')

Buggy submission (verdict: Runtime Error):
import sys

data = sys.stdin.readline()

a, b = data.strip().split()

if a == b:
  return 0
else:
  k = (a + b) / 2
  if k.is_integer():
    return k
  else:
    return 'IMPOSSIBLE'
Problem p02958 (python)

Fixed submission:
n = input()
N=list(map(int,input().split()))

count=0
for i in range(int(n)):
  if N[i] !=i+1:
    count+=1
if count > 2:
  print("NO")
else:
  print("YES")

Buggy submission (verdict: Runtime Error):
n = input()
s = input().split()
s=[int(i) for i in s]
count=-1
for i in range(int(n)//2):
   if s[i] + s[count] ==int(n)+1:
      count-=1
   	else:
      print("No")

if int(n) %2 ==0：
   print("YES")
else:
   if s[count]*2 == n :
    print("YES")
    else:
      print("NO")
Problem p03455 (python)

Fixed submission:
a,b = map(int,input().split())

if a*b%2 ==0:
  print('Even')
else:
  print('Odd')

Buggy submission (verdict: Runtime Error):
if (a * b)%2 == 0:
  print('Even')
else:
  print('Odd')
Problem p02957 (python)

Fixed submission:
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
if (a + b) % 2 == 0:
    print((a + b) // 2)
else:
    print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
if isinstance((a + b) / 2):
    print((a + b) / 2)
else:
    print("IMPOSSIBLE")
Problem p02957 (python)

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

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if (a+b)%2==1:
  print("IMIMPOSSIBLE")
else:
  print(a+b)//2
Problem p03455 (python)

Fixed submission:
a,b = map(int,input().split())
multiple = a*b
if multiple % 2 == 0:
  print('Even')
else:
  print('Odd')

Buggy submission (verdict: Runtime Error):
nums = map(int,input().split())
multiple = nums[0]*nums[1]
if multiple % 2 == 0:
  print('Even')
else:
  print('Odd')

Buggy submission (verdict: Runtime Error):
nums = map(int,input().split())
multiple = nums[0]*nums[1]
if multiple % 2 == 0:
  print('Even')
else
  print('Odd')
Problem p02957 (python)

Fixed submission:
# -*- coding: utf-8 -*-

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

Buggy submission (verdict: Runtime Error):
#!/bin/python3

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

if a % 2 == b % 2:
    print((a + b) / 2)
else:
    print("IMPOSSIBLE")
Problem p02963 (python)

Fixed submission:
import math
S = int(input())

x,y = 1,S
ret = int(math.sqrt(S))
if(ret**2 == S):
    print("{} {} {} {} {} {}".format(0,0,0,ret,ret,ret))
else:
    print("{} {} {} {} {} {}".format(0,0,ret+1,(ret+1)**2-S,1,ret+1))

Buggy submission (verdict: Runtime Error):
import math
S = int(input())

x,y = 1,S

for i in xrange(2,1+int(math.sqrt(S))):
    if S%i == 0:
        x = i
        y = S//i
        if y <= 10**9:
            break
    
    
print("{} {} {} {} {} {}".format(0,0,0,x,y,x))
Problem p03455 (python)

Fixed submission:
a , b = map(int, input().split())
c= a*b 
c=c%2
if c==1:
  print("Odd")
else:
  print("Even")

Buggy submission (verdict: Runtime Error):
a , b = map(int, input().split())
c= a*b 
c=c%2
if c==1:
  print(Odd)
else:
  print(Even)
Problem p03456 (python)

Fixed submission:
import math
a,b= input().split()
d = math.sqrt(int(a+b))


if d%1==0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
import math
a,b= input().split()
d = math.sqrt(int(a+b))

//小数判定
if d%1==0:
  print("YES")
else:
  print("NO")
Problem p02957 (python)

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

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

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
if a != b:
    c = (abs(a) + abs(b))/2
    if type(c) is int:
        print(c)
        return
if a == b:
    print(0)
    return
print("IMPOSSIBLE")
Problem p02958 (python)

Fixed submission:
N = input()
seq = list(map(int, input().split()))

is_switched = False
for i in range(len(seq)-1):
    if seq[i] <= min(seq[i+1:]):
        continue
    elif seq[i] > min(seq[i+1:]):
        if is_switched:
            print("NO")
            break
        j = seq.index(min(seq[i+1:]))
        seq[i], seq[j] = seq[j], seq[i]
        is_switched = True
else:
    print("YES")

Buggy submission (verdict: Runtime Error):
N = intpu()
seq = list(map(int, input().split()))

for i in range(len(seq)-1):
    if seq[i] <= min(seq[i+1:]):
        continue
    elif seq[i] > min(seq[i+1:]):
        j = seq.index(min(seq[i+1:]))
        if seq[i] > min(seq[i+1:j]+seq[j+1:]):
            print("NO")
            break
        seq[i], seq[j] = seq[j], seq[i]
else:
    print("YES")