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

Fixed submission:
# coding: utf-8

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

if set([num% 2 for num in nums]) == {0}:
    print("Yes")
    exit(0)

a,b,c = 0,0,0
for elem in nums:
    if elem % 4 == 0 : a += 1  # 4の倍数
    else:
        b += 1  # 4の倍数じゃない

# あとづけ 
# 2の倍数かつnot４の倍数についても考える必要がある
c = 0
for elem in nums:
        if elem % 2 == 0 and elem % 4 != 0: c += 1

if N % 2 == 1:  # 奇数
    if b-c <= (N-c+1)/2 : print("Yes")
    else: print("No")
else:  # 偶数
    if b-c <= a : print("Yes")
    else: print("No")

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

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

if set([num% 2 for num in nums]) == {0}:
    print("Yes")
    exit(1)

a,b,c = 0,0,0
for elem in nums:
    if elem % 4 == 0 : a += 1  # 4の倍数
    else:
        b += 1  # 4の倍数じゃない

# あとづけ 
# 2の倍数かつnot４の倍数についても考える必要がある
c = 0
for elem in nums:
        if elem % 2 == 0 and elem % 4 != 0: c += 1

if N % 2 == 1:  # 奇数
    if b-c <= (N-c+1)/2 : print("Yes")
    else: print("No")
else:  # 偶数
    if b-c <= a : print("Yes")
    else: print("No")
Problem p03646 (python)

Fixed submission:
def decrease(A,N):
    t = 0
    while(1):
        if max(A) <= N -1: break
        else:
            for i in range(N): A[i] = A[i] + 1
            i = A.index(max(A))
            A[i] = A[i] - N - 1
            t += 1
    return t


if __name__ == '__main__':
    K = int(input())
    p,q = K // 50, K % 50
    A = [i for i in range(50)]
    N = 50
    A = [a + p for a in A]
    for i in range(q):
        A = [a - 1 for a in A]
        A[i] += N + 1

    print(len(A))
    A = [str(a) for a in A]
    print(" ".join(A))

Buggy submission (verdict: Runtime Error):
def decrease(A,N):
    t = 0
    while(1):
        if max(A) <= N -1: break
        else:
            for i in range(N): A[i] = A[i] + 1
            i = A.index(max(A))
            A[i] = A[i] - N - 1
            t += 1
    return t


if __name__ == '__main__':
    K = int(input())
    p,q = K // 50, K % 50
    A = [i for i in range(50)]
    A = [a + p for a in A]
    for i in range(q):
        A = [a - 1 for a in A]
        A[i] += N + 1

    print(len(A))
    A = [str(a) for a in A]
    print(" ".join(A))
Problem p03719 (python)

Fixed submission:
nums = [int(x) for x in input().split()]

if nums[0] <= nums[2] <= nums[1]:
	print('Yes')
else:
	print('No')

Buggy submission (verdict: Runtime Error):
nums = [int(x) for x in input().split()]
N = nums[0]
K = nums[1]
arr = []
for i in range(N):
	nums = [int(x) for x in input().split()]
	arr.append(tuple(nums))

arr = sorted(arr, key=lambda x: x[0])

vol = 0
for i in range(len(arr)):
	vol = vol + arr[i][1]
	if vol >= K:
		print(arr[i][0])
		break
Problem p03563 (python)

Fixed submission:
r = input()
g = input()
print(int(g)*2-int(r))

Buggy submission (verdict: Runtime Error):
N = int(input())
t = [float(x) for x in input().rsplit()]
v = [float(x) for x in input().rsplit()]
t_0 = 0
t_now=0
v_0 = 0
v_now = 0
x = 0
t_end = sum(t)
for i in range(N-1):
    if t[i] > v[i] - v_now:
        x += (1 / 2) * (v[i] - v_now) ** 2
        v_now = v[i]
        x += v[i] * (t[i] - (v[i] - v_now))
    else :
        x+=t[i]*t[i]*(1/2)+v_now*t[i]
        v_now+=t[i]
    t_now +=t[i] 
x +=  (1 / 2) *(t_end-t_now) ** 2
print(x)
Problem p03564 (python)

Fixed submission:
n = int(input())
k = int(input())
a = 1
for i in range(n):
    if 2*a>=a+k:
        a = a+k
    else:
        a = 2*a
print(a)

Buggy submission (verdict: Runtime Error):
n = int(input())
k = int(input())
num = 2**n
list = [format(str(i),"b").zfill(n) for i in range(num)]
result = []
for i in list:
    a = 1
    for j in len(i):
        if i[j] == "0":
            a *= 2
        else:
            a += k
    result.apppend(a)
print(max(result))

Buggy submission (verdict: Runtime Error):
    n = int(input())
k = int(input())
num = 2**n
list = [format(i,"b").zfill(n) for i in range(num)]
result = []
for i in list:
    a = 1
    for j in range(len(i)):
        if i[j] == "0":
            a *= 2
        else:
            a += k
    result.append(a)
print(min(result))
Problem p03563 (python)

Fixed submission:
r = int(input())
a = int(input())
print(a*2-r)

Buggy submission (verdict: Runtime Error):
r, a = map(int, input().split())
print(2*a-r)

Buggy submission (verdict: Runtime Error):
#r+p = 2*a -> p = 2*a-r
r, a = map(int, input().split())
print(2*a-r)
Problem p03584 (python)

Fixed submission:
#get targets
def get (K):
	ret = [K]
	for r in range(31):
		if ((K >> r) & 1) == 1 :
			tmp = K
			tmp &= (~(1 << r))
			tmp |= (1 << r) - 1
			ret.append(tmp);
	return ret

#input
N, K = map(int, input().split())
items = []
for steps in range(N):
	A, B = map(int, input().split())
	items.append([A, B])
#process
targets = get(K)
answer = 0
for target in targets:
	cur = 0
	for a, b in items:
		if(target | a == target):
			cur += b;
	answer = max(answer, cur)

print(answer)

Buggy submission (verdict: Runtime Error):
#get targets
def targets (K):
	ret = [K]
	for r in range(31):
		if ((K >> r) & 1) == 1 :
			tmp = K
			tmp &= (~(1 << r))
			tmp |= (1 << r) - 1
			ret.append(tmp);
	return ret

#input
N, K = map(int, input().split())
items = []
for steps in range(N):
	A, B = map(int, input().slpit())
	items.append([A, B])
#process
targets = targets(K)
answer = 0
for target in targets:
	cur = 0
	for a, b in items:
		if(target | a == target):
			cur += b;
	answer = max(answer, cur)

print(answer)
Problem p03614 (python)

Fixed submission:
N = int(input())
p = [int(p_i) for p_i in input().split()]
p.append(0)
answer = 0
for i in range(N):
	if p[i] == i+1:
		answer += 1
		p[i+1] = p[i]

print(answer)

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

answer = 0
for i in range(N):
	if p[i] == i+1:
		answer += 1
		p[i+1] = p[i]

print(answer)
Problem p03563 (python)

Fixed submission:
R = int(raw_input())
G = int(raw_input())
print(2 * G - R)

Buggy submission (verdict: Runtime Error):
R = int(raw_input())
G = int(raw_input())
print(2 * G - R)

Buggy submission (verdict: Runtime Error):
R = int(raw_input())
G = int(raw_input())
print 2 * G - R
Problem p03563 (python)

Fixed submission:
# -*- coding: utf-8 -*-
# 整数の入力
r = int(input())
g = int(input())
print (2 * g - r)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# 整数の入力
R = int(raw_input())
G = int(raw_input())
print (2*G) - R
Problem p03563 (python)

Fixed submission:
r = input()
g = input()
print( 2*int(g) - int(r) )

Buggy submission (verdict: Runtime Error):
print( ( input() + input() ) / 2 )

Buggy submission (verdict: Runtime Error):
x = input()
y = input()
print( ( x + y ) / 2 )
Problem p03605 (python)

Fixed submission:
a = input()
if a.find("9") != -1:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a = input()
a.find("9")
if a !== -1:
    print("Yes")
else:
    print("No")
Problem p03606 (python)

Fixed submission:
ans = 0
for i in range(int(input())):
  r1, r2 = input().split()
  ans += int(r2) - int(r1) + 1
print(ans)

Buggy submission (verdict: Runtime Error):
ans = 0
N = int(input())
for i in range(N):
  r1, r2 = input().sprit()
  ans += int(r2) - int(r1) + 1
print(ans)

Buggy submission (verdict: Runtime Error):
ans = 0
N = int(input())
for i in range(N):
  r1, r2 = input().sprit()
  ans += r2 - r1 + 1
print(ans)

Buggy submission (verdict: Runtime Error):
ans = 0
for i in range(int(input())):
  r1, r2 = input().sprit()
  ans += r2 - r1 + 1
print(ans)
Problem p03563 (python)

Fixed submission:
R = int(input())
G = int(input())
b = 2*G - R
print(b)

Buggy submission (verdict: Runtime Error):
R = int(raw_input())
G = int(raw_input())
b = 2*G + R
print(b)
Problem p03563 (python)

Fixed submission:
r = int(raw_input())
g = int(raw_input())
k = 2*g - r
print k

Buggy submission (verdict: Runtime Error):
if "__name__"=="__main__":
  r = (int) raw_input()
  g = (int) raw_input()
  k = 2*g - r
  print k

Buggy submission (verdict: Runtime Error):
r = raw_input()
g = raw_input()
k = 2*g - r
print k
Problem p03657 (python)

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

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

if (A+B)%3 == 0 or A%3==0 or B%3==0:
    print ("Possible")
else:
    print ("Impossible")

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

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

SUM_CARD = sum(a)

i=1

diff_sum = 0
sunuke = sum(a[0:i])
diff_sum = abs(sunuke*2-SUM_CARD)
i+=1

while(i<N):
    sunuke = sum(a[0:i])
    diff_sum_new = abs(sunuke*2-SUM_CARD)
    if diff_sum_new<diff_sum:
        diff_sum = diff_sum_new
    i += 1

print(diff_sum)
Problem p03693 (python)

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

s=100*r+10*g+b
if s%4==0:
    print("YES")
else:
    print("NO")

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

num=[0,0,0,0,0,0,0,0,0]
counter=0

for i in a:
    if 1<=i and i<=399:
        num[0]+=1
    elif 400 <= i and i <= 799:
        num[1] += 1
    elif 800 <= i and i <= 1199:
        num[2] += 1
    elif 1200 <= i and i <= 1599:
        num[3] += 1
    elif 1600 <= i and i <= 1999:
        num[4] += 1
    elif 2000 <= i and i <= 2399:
        num[5] += 1
    elif 2400 <= i and i <= 2799:
        num[6] += 1
    elif 2800 <= i and i <= 3199:
        num[7] += 1
    elif 3200 <= i:
        num[8] += 1

for i in range(0,8):
    if num[i]!=0:
        counter+=1

if counter==0 and num[8]==0:
    min=0
    max=0

elif counter==0 and num[8]!=0:
    min=1
    max=num[8]

else:
    min=counter
    max=counter+num[8]

#print(num)
print(str(min)+" "+str(max))
Problem p03711 (python)

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


a = [0, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1]

if a[x] == a[y]:
    print("Yes")
else:
    print("No")

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


a = [0, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1]

if a[x] == a[y]:
    print("YES")
else:
    print("NO")
)

Buggy submission (verdict: Runtime Error):
a= int(input())
b,c=map(int, input().split())

s=input()

print (str(a+b+c)+" "+s)
Problem p03712 (python)

Fixed submission:
H,W=map(int,input().split())
a=[]
for i in range(H):
    a.append(map(str,input().split()))

for i in range(0,W+2):
    print("#",end="")
print()

for i in a:
    print("#",end="")
    for j in i:
        print(j,end="")
    print("#")

for i in range(0, W+2):
      print("#",end="")
print()

Buggy submission (verdict: Runtime Error):
H,W=map(int,input().split())
a=[]
for i in range(H):
    a.append(map(int,input().split()))

for i in range(0,W+2):
    print("#",end="")
print()

for i in a:
    print("#",end="")
    for j in i:
        print(j,end="")
    print("#")

for i in range(0, W+2):
      print("#",end="")
print()
Problem p03738 (python)

Fixed submission:
a=int(input())
b=int(input())
if a>b:
    print("GREATER")
elif a<b:
    print("LESS")
else:
    print("EQUAL")

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a>b:
    print("GREATER")
elif a<b:
    print("LESS")
else:
    print("EQUAL")

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a>b:
    print("GREATER")
elif a<b:
    print("EQUAL")
else:
    print("LESS")
Problem p03573 (python)

Fixed submission:
# -*- coding: utf-8 -*-
import numpy as np
from numpy import *
from copy import *

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

if A==B: print(C)
if B==C: print(A)
if C==A: print(B)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import sys, copy, math, itertools
from copy import *
from collections import deque
import numpy as np
from heapq import *
from bisect import *
import scipy as sp
from scipy.optimize import linprog
from scipy import ceil, ifft
from scipy.fftpack import fft

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

if A==B: print(C)
if B==C: print(A)
if C==A: print(B)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import sys, copy, math, itertools
from copy import *
from collections import deque
import numpy as np
from heapq import *
from bisect import *
import scipy as sp
from scipy.optimize import linprog
#from scipy import ceil, ifft
#from scipy.fftpack import fft

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

if A==B: print(C)
if B==C: print(A)
if C==A: print(B)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import sys, copy, math, itertools
from copy import *
from collections import deque
import numpy as np
from heapq import *
from bisect import *
import scipy as sp
from scipy.optimize import linprog
from scipy import ceil, ifft
from scipy.fftpack import fft

# 読み込み
a = int( input() )
b, c = list( map(int, input().split() ) )
s = input()

print( str(a+b+c)+" "+s )

# 改行しない print
#print( str(a+b+c)+" "+s, end='' )
Problem p03657 (python)

Fixed submission:
l=[int(i) for i in input().split()]
if (l[0]%3)==0 or (l[1]%3)==0 or (l[0]+l[1])%3==0:
  print ("Possible")
else:
  print ("Impossible")

Buggy submission (verdict: Runtime Error):
n,k=[int(i) for i in input().split()]
l=[int(i) for i in input().split()]
l.sort()
a=0
for i in range(k):
  a+=l[n-1-i]
print(a)
Problem p03719 (python)

Fixed submission:
xs = [int(x) for x in input().split()]

if xs[2] >= xs[0] and xs[2] <= xs[1]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
xs = map(int, raw_input().split())

if xs[2] >= xs[0] and xs[2] <= xs[1]:
    print "Yes"
else:
    print "No"
Problem p03573 (python)

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

if a==b:
  print(c)
elif b==c:
  print(a)
elif c==a:
  print(b)
else:
  pass

Buggy submission (verdict: Runtime Error):
if input[0]==input[1]:
  print(input[2])
Problem p03569 (python)

Fixed submission:
def palindrome(s):
  for i in range(len(s) // 2):
    if s[i] != s[-i -1]:
      return False
  return True

def main():
  s = input()
  t = ''
  for ch in s:
    if ch != 'x':
      t += ch

  if len(t) == 0:
    print(0)
    return

  if (palindrome(t) == False):
    print(-1)
    return

  cnt = 0
  odd = len(t) & 1
  mid = len(t) // 2

  if odd == 1:  # ax[b]a

    for i in range(len(s)):
      if s[i] != 'x':
        cnt += 1
        if cnt == mid + 1:
          s1 = s[      : i]
          s2 = s[i + 1 :  ]
          break    

  else: # a[x]a

    for i in range(len(s)):
      if s[i] != 'x':
        cnt += 1
        if cnt == mid:
          s1 = s[  : i + 1]
        if cnt == mid + 1:
          s2 = s[i :  ]
          break

  # print(s1, s2)
  ans = 0
  i = 0
  j = 0
  while (i < len(s1) and j < len(s2)):
    c1 = s1[i]
    c2 = s2[-j-1]
    if c1 == c2:
      i += 1
      j += 1
      continue

    ans += 1
    if c1 == 'x':
      i += 1
    else:
      j += 1

  ans += (len(s1) - i) + (len(s2) - j)
  print(ans)






if __name__ == '__main__':
  main()

Buggy submission (verdict: Runtime Error):
def palindrome(s):
  for i in range(len(s) // 2):
    if s[i] != s[-i -1]:
      return False
  return True

def main():
  s = input()
  t = ''
  for ch in s:
    if ch != 'x':
      t += ch

  if (palindrome(t) == False):
    print(-1)
    return

  cnt = 0
  odd = len(t) & 1
  mid = len(t) // 2

  if odd == 1:  # ax[b]a

    for i in range(len(s)):
      if s[i] != 'x':
        cnt += 1
        if cnt == mid + 1:
          s1 = s[      : i]
          s2 = s[i + 1 :  ]
          break    

  else: # a[x]a

    for i in range(len(s)):
      if s[i] != 'x':
        cnt += 1
        if cnt == mid:
          s1 = s[  : i + 1]
        if cnt == mid + 1:
          s2 = s[i :  ]
          break

  st = ''
  for ch in s2:
    st = ch + st

  # print(s1, st)
  ans = 0
  i = 0
  j = 0
  while (i < len(s1) and j < len(st)):
    c1 = s1[i]
    c2 = st[j]
    if c1 == c2:
      i += 1
      j += 1
      continue

    ans += 1
    if c1 == 'x':
      i += 1
    else:
      j += 1

  ans += (len(s1) - i) + (len(st) - j)
  print(ans)






if __name__ == '__main__':
  main()
Problem p03574 (python)

Fixed submission:
def main():
    b = []
    line = input().split(" ")
    H = int(line[0])
    W = int(line[1])
    for l in range(H):
        b.append(input())

    result = []
    for i, line in enumerate(b):
        result_row = ""
        for j, c in enumerate(line):
            if c == ".":
                n = count(i, j, b, H, W)
                result_row += str(n)
            else:
                result_row += b[i][j]
        result.append(result_row)

    for l in result:
        print(l)


def count(row, column, board, H, W):
    n = 0
    rs, re = judge_row(row, H)
    cs, ce = judge_col(column, W)
    for r in range(rs, re):
        for c in range(cs, ce):
            if board[r][c] == "#":
                n += 1
    return n


def judge_row(row, H):
    if H == 1:
        return 0, 1
    elif row == 0:
        return row, row+1+1 
    elif row == H-1:
        return row-1, row+1
    else:
        return row-1, row+1+1


def judge_col(col, W):
    if W == 1:
        return 0, 1
    elif col == 0:
        return col, col+1+1 
    elif col == W-1:
        return col-1, col+1
    else:
        return col-1, col+1+1


if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
def main():
    b = []
    line = input().split(" ")
    H = int(line[0])
    W = int(line[1])
    for l in range(H):
        b.append(input())

    result = []
    for i, line in enumerate(b):
        result_row = ""
        for j, c in enumerate(line):
            if c == ".":
                n = count(i, j, b, H, W)
                result_row += str(n)
            else:
                result_row += b[i][j]
        result.append(result_row)

    for l in result:
        print(l)


def count(row, column, board, H, W):
    n = 0
    rs, re = judge_row(row, H)
    cs, ce = judge_col(column, W)
    for r in range(rs, re):
        for c in range(cs, ce):
            if board[r][c] == "#":
                n += 1
    return n


def judge_row(row, H):
    if row == 0:
        return row, row+1+1 
    elif row == H-1:
        return row-1, row+1
    else:
        return row-1, row+1+1


def judge_col(col, W):
    if col == 0:
        return col, col+1+1 
    elif col == W-1:
        return col-1, col+1
    else:
        return col-1, col+1+1


if __name__ == "__main__":
    main()
Problem p03578 (python)

Fixed submission:
from collections import defaultdict

input()
d_list = input().split(" ")
input()
t_list = input().split(" ")

d_dict = defaultdict(lambda: 0)
for d in d_list:
    d_dict[d] += 1

t_dict = defaultdict(lambda: 0)
for t in t_list:
    t_dict[t] += 1

yes = True
for k, v in t_dict.items():
    if v > d_dict[k]:
        print("NO")
        yes = False
        break
if yes:
    print("YES")

Buggy submission (verdict: Runtime Error):
from collections import defaultdict

input()
d_list = input().split(" ")
input()
t_list = input().split(" ")

d_dict = defaultdict(lambda: 0)
for d in d_list:
    d_dict[d] += 1

t_dict = defaultdict(lambda: 0)
for t in t_list:
    t_dict[t] += 1

for k, v in t_dict.items():
    if v > d_dict[k]:
        print("NO")
        exit(1)
print("YES")
Problem p03997 (python)

Fixed submission:
a = int(raw_input())
b = int(raw_input())
c = int(raw_input())
print (a+b)*c/2

Buggy submission (verdict: Runtime Error):
a = int(raw_input())
b = int(raw_input())
c = int(raw_input())
print (a+b)*h/2
Problem p04033 (python)

Fixed submission:
a, b = map(int, raw_input().split())
if a < 0 and b < 0 and (b-a)%2 == 0:
    print 'Negative'
elif a <= 0 <= b:
    print 'Zero'
else:
    print 'Positive'

Buggy submission (verdict: Runtime Error):
a, b = map(int, raw_input().split())
if a < 0 and b < 0 and (b-a)%2 == 0:
    print 'Negative'
elif 0 in range(a, b+1):
    print 'Zero'
else:
    print 'Positive'
Problem p03569 (python)

Fixed submission:
s = input()
go = []
back = []
start = 0
end = len(s)-1
res = 0
while start<=end:
    gox = 0
    backx = 0
    while s[end] == 'x' or s[start] == 'x':
        if s[start] == 'x' and start<end:
            start+=1
            gox += 1
        if s[end] == 'x'and start<end:
            end -= 1
            backx +=1
        if start == end:break
    if start == end and s[start] == 'x':
        break
    if s[start] == s[end]:
        start += 1
        end -=1
        res += abs(gox-backx)
        gox = 0
        backx = 0
    else:
        res = -1
        break

print(res)

Buggy submission (verdict: Runtime Error):
s = input()
go = []
back = []
start = 0
end = len(s)-1
res = 0
while start<=end:
    gox = 0
    backx = 0
    while s[start] == 'x' and start<=end:
        start+=1
        gox += 1
    while s[end] == 'x'and start<=end:
        end -= 1
        backx +=1
    if start == end and s[start] == 'x':
        break
    if s[start] == s[end]:
        start += 1
        end -=1
        res += abs(gox-backx)
        gox = 0
        backx = 0
    else:
        res = -1
        break

print(res)
Problem p03573 (python)

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

if a == b and a != c:
    print(c)
elif a != b and a == c:
    print(b)
else:
    print(a)

Buggy submission (verdict: Runtime Error):
if a == b and a != c:
    print(c)
elif a != b and a == c:
    print(b)
else:
    print(a)
Problem p03573 (python)

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

if a == b:
  print(c)
elif a == c:
  print(b)
else:
  print(a)

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input().split())

if a == b:
  print(c)
elif a == c:
  print(b):
else:
  print(a)
Problem p03623 (python)

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

if abs(x - a) >= abs(x - b):
  print('B')

else:
  print('A')

Buggy submission (verdict: Runtime Error):
x, a, b = map(int, input().split())

if |x - a| >= |x-b|:
  print('A')

else:
  print('B')
Problem p03635 (python)

Fixed submission:
n,m = map(int, input().split())
print((n-1)*(m-1))

Buggy submission (verdict: Runtime Error):
n,m = map(int, input().split())
pirnt((n-1)*(m-1))
Problem p03679 (python)

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

if a < b <= x + a:
  print('safe')
  
elif b <= a:
  print('delicious')

else:
  print('dangerous')

Buggy submission (verdict: Runtime Error):
x, a, b =map(int, input().split())
if b - a > x
  print('dangerous')
elif b - a == x:
  print('safe')
else:
  print('delicious')
Problem p03844 (python)

Fixed submission:
a, b, c = input().split()
if b == '+':
  print(int(int(a) + int(c)))
else:
  print(int(int(a) - int(c)))

Buggy submission (verdict: Runtime Error):
a, b, c = input().split()
if b = '+':
  print(int(int(a) + int(c)))
else:
  print(int(int(a) - int(c)))

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input().split())

print(int(a b c))
Problem p03943 (python)

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

if (a + b == c) or (a + c == b) or (b + c ==a):
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input().split())

if (a + b == c) or (a + c == b) or (b + c ==a):
  print(Yes)
else:
  print(No)