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

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

Buggy submission (verdict: Runtime Error):
import sys

a, b = input().split(" ")
if a*b % 2 == 0:
  print("Even")
else:
  print("Odd")

Buggy submission (verdict: Runtime Error):
import sys

a, b = input().split(" ")
if a*b % 2 == 0:
  print("Even")
else:
  print("Odd")
Problem p03238 (python)

Fixed submission:
N = int(raw_input())

if N == 1:
    print 'Hello World'
else:
    A = int(raw_input())
    B = int(raw_input())
    print str(A+B)

Buggy submission (verdict: Runtime Error):
N = int(raw_input())

if N == 1:
    print 'Hello World'
else:
    A = int(raw_input())
    B = int(raw_input())
    print str(A+B)
Problem p03240 (python)

Fixed submission:
# coding: utf-8
# Your code here!

import itertools

N = int(input())
ta = [list(map(int,input().split())) for _ in range(N)]
for Cx, Cy in itertools.product(range(101),range(101)):
    # もしcx,cyが決まっていた場合矛盾が起こらないか
    # H = abs(x-cx)+abs(y-cy) + h
    H = None
    for [x,y,h] in ta:
        if h == 0:
            pass
        else:
            if H is None:
                H = h + abs(x-Cx)+abs(y-Cy)
            else:
                if H != h + abs(x-Cx)+abs(y-Cy):
                    break
    for [x,y,h] in ta:
        if h != max(H - abs(x-Cx) - abs(y-Cy),0):
            break
    else:
        break
print(Cx,Cy,H)

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# Your code here!

import itertools

N = int(input())
ta = [list(map(int,input().split())) for _ in range(N)]
for Cx, Cy in itertools.product(range(101),range(101)):
    # もしcx,cyが決まっていた場合矛盾が起こらないか
    # H = abs(x-cx)+abs(y-cy) + h
    H = None
    for [x,y,h] in ta:
        if h == 0:
            pass
        else:
            if H is None:
                H = h + abs(x-Cx)+abs(y-Cy)
            else:
                if H != h + abs(x-Cx)+abs(y-Cy):
                    break
        if h != max(H - abs(x-Cx) - abs(y-Cy),0):
            break
    else:
        break
print(Cx,Cy,H)
Problem p03262 (python)

Fixed submission:
import sys
input = sys.stdin.readline
import math

N, X = map(int,input().split())
x = list(map(int,input().split()))

d = [abs(X-x[i]) for i in range(N)]
oppai = d[0]

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a


for i in range(N-1):
    oppai = gcd(oppai,d[i+1])

print(oppai)

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
import math

N, X = map(int,input().split())
x = list(map(int,input().split()))

d = [abs(X-x[i]) for i in range(N)]
gcd = d[0]

for i in range(N-1):
    gcd = math.gcd(gcd,d[i+1])

print(gcd)

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
import math
from functools import reduce

N, X = map(int,input().split())
x = list(map(int,input().split()))

d = [abs(X-x[i]) for i in range(N)]

def gcd(numbers):
    return reduce(math.gcd, numbers)

print(gcd(d))
Problem p03457 (python)

Fixed submission:
n = int(input())
t = [0 for _ in range(n+1)]
x = [0 for _ in range(n+1)]
y = [0 for _ in range(n+1)]
for i in range(n):
    t[i+1], x[i+1], y[i+1] = [int(z) for z in input().split()]
    if t[i+1] - t[i] < abs(x[i + 1] - x[i]) + abs(y[i + 1] - y[i]) or (t[i+1] % 2 != (abs(x[i+1]) + abs(y[i+1])) % 2):
        print('No')
        exit()
print('Yes')

Buggy submission (verdict: Runtime Error):
n = int(input())
for i in range(n):
    t, x, y = map(int, input().split())
    if x + y < t or (x + y + t) % 2:
        print("No")
        exit()
print("Yes")
Problem p03854 (python)

Fixed submission:
def test():
    s = input()
    divide = ["dream", "dreamer", "erase", "eraser"]
    dp = [0 for i in range(100010)]

    dp[0] = 1
    for i in range(len(dp)):
        if dp[len(s)] == 1:
            print('YES')
            return 0
        if dp[i] == 0:
            continue
        for d in divide:
            if s[i:i+len(d)] == d:
                dp[i+len(d)] = 1
    print('NO')

test()

Buggy submission (verdict: Runtime Error):
def test():
    s = input()
    divide = ["dream", "dreamer", "erase", "eraser"]
    dp = [0 for i in range(10010)]

    dp[0] = 1
    for i in range(len(dp)):
        if dp[len(s)] == 1:
            print('YES')
            return 0
        if dp[i] == 0:
            continue
        for d in divide:
            if s[i:i+len(d)] == d:
                dp[i+len(d)] = 1
    print('NO')

test()

Buggy submission (verdict: Runtime Error):
def test():
    s = input()
    divide = ["dream", "dreamer", "erase", "eraser"]
    dp = [0 for i in range(10010)]

    dp[0] = 1
    for i in range(len(dp)):
        if dp[len(s)] == 1:
            print('YES')
            return 0
        if dp[i] == 0:
            continue
        for d in divide:
            if s[i:i+len(d)] == d:
                dp[i+len(d)] = 1
                print(i+len(d))
    print('NO')

test()
Problem p03501 (python)

Fixed submission:
n,a,b = input().split()
print(min(int(n)*int(a),int(b)))

Buggy submission (verdict: Runtime Error):
n,a,b = split(input())
print (min(n*a,b))
Problem p03547 (python)

Fixed submission:
a,b=input().split()
if a > b:
  print(">")
elif a < b:
  print("<")
else:
  print("=")

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

Fixed submission:
a,b = input().split()
if int(a) < int(b):
  print(0)
else:
  print(int(a)-int(b))

Buggy submission (verdict: Runtime Error):
a,b = input().split()
if int(a) < int(b):
  print(0)
else
  print(int(a)-int(b))
Problem p03643 (python)

Fixed submission:
print("ABC" + input())

Buggy submission (verdict: Runtime Error):
print("ABC" ++ input())
Problem p03697 (python)

Fixed submission:
a,b = input().split()
if int(a)+int(b) < 10:
  print(int(a)+int(b))
else:
  print("error")

Buggy submission (verdict: Runtime Error):
a,b = input().split()
if a+b < 10:
  print(a+b)
else:
  print("error")
Problem p03359 (python)

Fixed submission:
a, b = map(int, input().split())
if a>b:
    print(a-1)
else :
    print(a)

Buggy submission (verdict: Runtime Error):
n = int(input())
import math
import random
s = [1 for i in range(55555+1)]
s[0], s[1] = 0, 0
for i in range(2, int(math.sqrt(55555))+1):
    if s[i] != 0:
        for j in range(i*2, 55555, i):
            s[j] = 0
prime = []
for i in range(55555+1):
    if s[i] == 1:
        prime.append(i)

def is_prime(q):
    q = abs(q)
    if q == 2:
        return True
    if q < 2 or q & 1 == 0:
        return False
    return pow(2, q - 1, q) == 1








while True:
    a = random.sample(prime, n)
    count = 0
    while True:
        b = random.sample(a, 5)
        if is_prime(sum(b)):
            break
        else:
            count += 1
        if count > 30:
            ans = ''
            for i in a:
                ans += str(i) + ' '
            print(ans[:-1])
            # print(sum(a))
            # print(is_prime(sum(a)))
            quit()
Problem p03361 (python)

Fixed submission:
h, w = map(int, input().split())
s = [list('.'*(w+2))]
for i in range(h):
    s.append(list('.' + input() + '.'))
s.append(list('.'*(w+2)))

def search(y, x):
    t = 0
    for i in [[0, 1], [0, -1], [1, 0], [-1, 0]]:
        dy, dx = y + i[0], x + i[1]
        if s[dy][dx] == '#':
            t += 1
    if t > 0:
        return True
    else:
        return False


for i in range(w):
    for j in range(h):
        if s[j+1][i+1] == '#' and not search(j+1, i+1):
            print('No')
            quit()
print('Yes')

Buggy submission (verdict: Runtime Error):
h, w = map(int, input().split())
s = [list('.'*(w+2))]
for i in range(h):
    s.append(list('.' + input() + '.'))
s.append(list('.'*(w+2)))

def search(y, x):
    t = 0
    for i in [[0, 1], [0, -1], [1, 0], [-1, 0]]:
        dy, dx = y + i[0], x + i[1]
        if s[dy][dx] == '#':
            t += 1
    if t > 0:
        return True
    else:
        return False


for i in range(w):
    for j in range(h):
        if s[j+1][h+1] == '#' and not search(j+1, h+1):
            print('No')
            quit()
print('Yes')

Buggy submission (verdict: Runtime Error):
h, w = map(int, input().split())
s = [list('.'*(w+2))]
for i in range(h):
    s.append(list('.' + input() + '.'))
s.append(list('.'*(w+2)))

def search(y, x):
    t = 0
    for i in [[0, 1], [0, -1], [1, 0], [-1, 0]]:
        dy, dx = y + i[0], x + i[1]
        if s[dy][dx] == '#':
            t += 1
    if t > 0:
        return True
    else:
        return False


for i in range(w):
    for j in range(h):
        if s[i+1][j+1] == '#' and not search(i+1, j+1):
            print('No')
            quit()
print('Yes')

Buggy submission (verdict: Runtime Error):
h, w = map(int, input().split())
s = [list('.'*(w+2))]
for i in range(h):
    s.append(list('.' + input() + '.'))
s.append(list('.'*(w+2)))
for i in s:
    print(i)

def search(y, x):
    t = 0
    for i in [[0, 1], [0, -1], [1, 0], [-1, 0]]:
        dy, dx = y + i[0], x + i[1]
        if s[dy][dx] == '#':
            t += 1
    if t > 0:
        return True
    else:
        return False


for i in range(w):
    for j in range(h):
        if s[i+1][j+1] == '#' and not search(i+1, j+1):
            print('No')
            quit()
print('Yes')
Problem p03436 (python)

Fixed submission:
h, w = map(int, input().split())
s = [list('#' * (w + 2))]
queue = [[1, 1, 1]]
dot = 0
for i in range(h):
    s.append(['#'] + list(input()) + ['#'])
    dot += s[-1].count('.')
s.append(list('#' * (w + 2)))

def move(yxc):
    y, x, cost = yxc[0], yxc[1], yxc[2]
    global queue
    for dy, dx in ([1, 0], [-1, 0], [0, 1], [0, -1]):
        ny, nx = y + dy, x + dx
        if s[ny][nx] == '.':
            s[ny][nx] = cost + 1
            queue.append([ny, nx, cost + 1])

while len(queue) > 0:
    move(queue.pop(0))

s[1][1] = 1
move([1, 1, 1])
if s[h][w] == '.':
    print(-1)
else:
    print(dot - s[h][w])

Buggy submission (verdict: Runtime Error):
h, w = map(int, input().split())
s = [list('#' * (w + 2))]
dot = 0
for i in range(h):
    s.append(['#'] + list(input()) + ['#'])
    dot += s[-1].count('.')
s.append(list('#' * (w + 2)))


def walk(y, x, l):
    for i in [[1, 0], [0, 1], [-1, 0], [0, -1]]:
        dy = y + i[0]
        dx = x + i[1]
        if s[dy][dx] == '.':
            s[dy][dx] = l + 1
            walk(dy, dx, l + 1)
        elif s[dy][dx] != '#':
            if s[dy][dx] > l+1:
                s[dy][dx] = l + 1
                walk(dy, dx, l + 1)

s[1][1] = 1
walk(1, 1, 1)
if s[h][w] == '.':
    print(-1)
else:
    print(dot - s[h][w])
Problem p03485 (python)

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

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
ans = []
for i in set(a):
    temp = a.count(i)
    if temp > i:
        ans += temp - i
    elif temp < i:
        ans += i
print(ans)
Problem p03583 (python)

Fixed submission:
N = int(input())
if N % 2 == 0:
    print(N // 2, N, N)
    quit()
for h in range(1, 3500+1):
    hN = h * N
    for n in range(h, 3500+1):
        b = (4 * h * n - n * N - hN)
        if b <= 0:
            continue
        a = (n * hN)
        if a % b == 0:
            print(h, n, a // b)
            quit()

Buggy submission (verdict: Runtime Error):
N = int(input())
if N % 2 == 0:
    print(N // 2, N, N)
for h in range(1, 3500+1):
    hN = h * N
    for n in range(h, 3500+1):
        b = (4 * h * n - n * N - hN)
        if b > 0:
            continue
        a = (n * hN)
        if a % b == 0:
            print(h, n, a // b)
            quit()
Problem p03608 (python)

Fixed submission:
from itertools import permutations

def main():
    N, M, R = map(int, input().split())
    r = map(int, input().split())
    inf = float('inf')
    d = [[inf] * N for i in range(N)]

    for i in range(N):
        d[i][i] = 0

    for i in range(M):
        a, b, c = map(int, input().split())
        a -= 1
        b -= 1
        if d[a][b] > c:
            d[a][b], d[b][a] = c, c

    for k in range(N):
        for i in range(N):
            for j in range(N):
                temp = d[i][k] + d[k][j]
                if d[i][j] > temp:
                    d[i][j] = temp

    ans = inf
    for i in permutations(r):
        temp = 0
        for j in range(len(i)-1):
            temp += d[i[j] - 1][i[j + 1] - 1]
            if temp > ans:
                break
        if ans > temp:
            ans = temp

    print(ans)


main()

Buggy submission (verdict: Runtime Error):
import itertools

N, M, R = map(int, input().split())
r = map(int, input().split())
inf = float('inf')
d = [[inf for j in range(N)] for i in range(N)]

for i in range(N):
    d[i][i] = 0

for i in range(M):
    a, b, c = map(int, input().split())
    a -= 1
    b -= 1
    t = min(c, d[a][b])
    if d[a][b] > c:
        d[a][b], d[b][a] = t, t

for i in range(N):
    for j in range(N):
        for k in range(N):
            d[i][j] = min(d[i][j], d[i][k] + d[k][j])

ans = inf
for i in list(itertools.permutations(r)):
    temp = 0
    for j in range(len(i)):
        temp += d[i[j]-1][i[j+1]]
        if temp > ans:
            break
    ans = min(ans, temp)

print(ans)

Buggy submission (verdict: Runtime Error):
import itertools

N, M, R = map(int, input().split())
r = map(int, input().split())
inf = float('inf')
d = [[inf for j in range(N)] for i in range(N)]

for i in range(N):
    d[i][i] = 0

for i in range(M):
    a, b, c = map(int, input().split())
    a -= 1
    b -= 1
    t = min(c, d[a][b])
    if d[a][b] > c:
        d[a][b], d[b][a] = t, t

for i in range(N):
    for j in range(N):
        for k in range(N):
            d[i][j] = min(d[i][j], d[i][k] + d[k][j])

ans = inf
for i in list(itertools.permutations(r)):
    temp = 0
    for j in range(len(i)):
        temp += d[i[j]-1][i[j+1]]
    ans = min(ans, temp)

print(ans)
Problem p03693 (python)

Fixed submission:
r, g, b = map(str, input().split())
if int(r+g+b)%4 == 0:
    print('YES')
else:
    print('NO')

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

a.sort()
color = []
other = 0
for i in a:
    if i < 400 * 1:
        color.append('1')
    elif i < 400 * 2:
        color.append('2')
    elif i < 400 * 3:
        color.append('3')
    elif i < 400 * 4:
        color.append('4')
    elif i < 400 * 5:
        color.append('5')
    elif i < 400 * 6:
        color.append('6')
    elif i < 400 * 7:
        color.append('7')
    elif i < 400 * 8:
        color.append('8')
    else:
        other += 1
max_ans = len(set(color)) + other
min_ans = len(set(color))
if min_ans == 0 and other != 0:
    min_ans = 1
print(min_ans, max_ans)
Problem p03695 (python)

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

a.sort()
color = []
other = 0
for i in a:
    if i < 400 * 1:
        color.append('1')
    elif i < 400 * 2:
        color.append('2')
    elif i < 400 * 3:
        color.append('3')
    elif i < 400 * 4:
        color.append('4')
    elif i < 400 * 5:
        color.append('5')
    elif i < 400 * 6:
        color.append('6')
    elif i < 400 * 7:
        color.append('7')
    elif i < 400 * 8:
        color.append('8')
    else:
        other += 1
max_ans = len(set(color)) + other
min_ans = len(set(color))
if min_ans == 0 and other != 0:
    min_ans = 1
print(min_ans, max_ans)

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

a.sort()
color = []
other = 0
for i in a:
    if i < 400 * 1:
        color.append('1')
    elif i < 400 * 2:
        color.append('2')
    elif i < 400 * 3:
        color.append('3')
    elif i < 400 * 4:
        color.append('4')
    elif i < 400 * 5:
        color.append('5')
    elif i < 400 * 6:
        color.append('6')
    elif i < 400 * 7:
        color.append('7')
    elif i < 400 * 8:
        color.append('8')
    else:
        other += 1
max_ans = len(set(color)) + other
if max_ans > 8:
    max_ans = 8
min_ans = len(set(color))
if min_ans == 0 and other != 0
    min_ans = 1
print(min_ans, max_ans)
Problem p03713 (python)

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


def area(s):
    ans = max(s) - min(s)
    return ans


if h % 3 == 0 or w % 3 == 0:
    ans = 0
else:
    temp = []
    s1 = [round(w / 3) * h, (w - round(w / 3)) * round(h / 2), round(w - w / 3) * (h - round(h / 2))]
    s2 = [round(h / 3) * w, (h - round(h / 3)) * round(w / 2), round(h - h / 3) * (w - round(w / 2))]
    temp.append(area(s1))
    temp.append(area(s2))
    if w > 2:
        s3 = [round(w / 3) * h, (w - round(w / 3) * 2) * h]
        temp.append(area(s3))
    if h > 2:
        s4 = [round(h / 3) * w, (h - round(h / 3) * 2) * w]
        temp.append(area(s4))
    ans = min(temp)
print(ans)

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

if h%3 == 0 or w%3 == 0:
    ans = 0
else:
    s = []
    high = max(h, w)
    low = min(h, w)
    s.append(round(high/3)*low)
    high2 = max(high-round(high/3), low)
    low2 = min(high-round(high/3), low)
    s.append(round(high2/2)*low2)
    s.append((high2-round(high2/2))*low2)
    ans = max(s) - min(s)
print (ans)
print (s)

Buggy submission (verdict: Runtime Error):
import math
h, w = map(int, input().split())
low = min(h, w)
high = max(h, w)

if h%3 == 0 or w%3 == 0:
    print (0)
elif (high/3) > low:
    print ((high % 3)*low
else:
    a = math.ceil(high/3)*low
    b = (high-math.ceil(high/3))*int(low/2)
    c = abs(a-b)

    a = round(high/3)*low
    b = (high-round(high/3))*int(low/2)
    d = abs(a-b)

    print (min(c, d))

Buggy submission (verdict: Runtime Error):
import math
h, w = map(int, input().split())
low = min(h, w)
high = max(h, w)

if h%3 == 0 or w%3 == 0:
    print (0)
elif (high/3) > low:
    print ((high % 3)*low
else:
    a = math.ceil(high/3)*low
    b = (high-math.ceil(high/3))*int(low/2)
    c = abs(a-b)

    a = round(high/3)*low
    b = (high-round(high/3))*int(low/2)
    d = abs(a-b)

    print (min(c, d))
Problem p03795 (python)

Fixed submission:
n = int(input())
print (n * 800 - (n // 15) * 200)

Buggy submission (verdict: Runtime Error):
s, c = map(int, input().split())
ans = 0

if s<=2*c:
    c -= 2*s
    ans += s + c//4
else:
    ans += s

print (ans)
Problem p03556 (python)

Fixed submission:
s = input()

n = int(s)

answer = []

x = 1
answer.append(x)

while (x * x <= n):
    x += 1
    answer.append(x * x)

p = answer.pop()
if p == 1:
    print(p)
else:
    ans = answer.pop()
    print(ans)

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

n = int(s)

answer = []

x = 1
answer.append(x)

while (x * x < n):
    x += 1
    answer.append(x * x)

p = answer.pop()
ans = answer.pop()

print(ans)
Problem p03644 (python)

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

x = 1

numbers = []

while (x <= p):
    x *= 2
    numbers.append(x)

if p == 1:
    answer = 1
else:
    y = numbers.pop()
    answer = numbers.pop()

print(answer)

Buggy submission (verdict: Runtime Error):
s = input()
p = int(s)

x = 1

numbers = []

while (x <= p):
    x *= 2
    numbers.append(x)

y = numbers.pop()
answer = numbers.pop()

print(answer)
Problem p03455 (python)

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

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
if (a% 2 ==0)or(b% 2 ==0):
    print("Even")
else:
    print("Odd")

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

if (a% 2 ==0) &  (b% 2 ==0):
    print("Even")
else:
    print("Odd")

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

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

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

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

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

if b-a == 0:
    print("Even")
else:
    print("Odd")
Problem p03457 (python)

Fixed submission:
N = int(input())
cord_list = [[0, 0, 0]]
flag = 0
for i in range(N):
    cord_list.append(list(map(int, input().split())))
    
for j in range(N):
    a = cord_list[j+1][0] - cord_list[j][0]
    b = cord_list[j+1][1] - cord_list[j][1]
    c = cord_list[j+1][2] - cord_list[j][2]
    if ((a - (abs(b) + abs(c)))%2 ==0) & ((abs(b) + abs(c)) <= a):
        pass
    else:
        print("No")
        flag += 1
        break
        
if flag == 0:
    print("Yes")

Buggy submission (verdict: Runtime Error):
N = int(input())
for i in range(N):
    cord_list.append(list(map(int, input().split())))

cord_list = [[0, 0, 0]]
flag = 0

for j in range(N):
    a = cord_list[j+1][0] - cord_list[j][0]
    b = abs(cord_list[j+1][1] - cord_list[j][1])
    c = abs(cord_list[j+1][2] - cord_list[j][2])
    if ((a - (b + c))%2 ==0) & ((b+c) <= a):
        pass
    else:
        print("No")
        flag += 1
        break
        
if flag == 0:
    print("Yes")
Problem p03469 (python)

Fixed submission:
a = input()
print("2018/01/" + a[-2:])

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())
counter = True
for i in range(N+1):
    for j in range(N - i+1):
        if j >= 0 and (N-i-j) >= 0 and counter:
            if 10**4*i + 5*10**3*j + 10**3*(N-i-j) == Y:
                #print(str(i)+" "+str(j)+" "+str(N-i-j))
                print(i, j, N-i-j)
                counter = False
        else:
            break
if counter:
    print("-1 -1 -1")
Problem p03474 (python)

Fixed submission:
g = list(map(int,input().split()))
S = str(input())
 
if ((S[:g[0]]+S[g[0]+1:]).isdigit()) &  (S[g[0]]=="-"):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
A, B= [int(input() )for _ in range(2)]
S = str(input())

if ((S[:A]+S[A+1:]).isdigit()) == True:  
    if S[A]=="-":
        print("Yes")
    else:
        print("No")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
A, B= [int(input() )for _ in range(2)]
S = str(input())

if ((S[:A]+S[A+1:]).isdigit()) &  (S[A]=="-"):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
A, B= [int(input() )for _ in range(2)]
S = list(input())

if ("".join(S[0:A]+S[B:]).isdigit()) & (S[A]=="-"):
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
A, B= [int(input() )for _ in range(2)]
S = str(input())

try:
    if type(int(S[:A]+S[A+1:]))!= int:
        print("No")
    elif S[A]!="-": 
        print('No')
    else:
        print('Yes')
except:
    print("No")

Buggy submission (verdict: Runtime Error):
A, B= [int(input() )for _ in range(2)]
S = str(input())

try:
    if (type((int(S[:A])+int(S[A+1:])))== int):
        if S[A]=="-": 
                print('Yes')
    else:
        print('No')
except:
    print("No")

Buggy submission (verdict: Runtime Error):
A, B= [int(input() )for _ in range(2)]
S = str(input())

try:
    if (type(int(S[:A]))== int):
        if S[A]=="-": 
            if type(int(S[A+1:]))==int:
                print('Yes')
    else:
        print('No')
except:
    print("No")

Buggy submission (verdict: Runtime Error):
A, B= [int(input() )for _ in range(2)]
S = str(input())

try:
    if (type(int(S[:A]))== int) & (S[A]=="-") & (type(int(S[A+1:]))==int):
        print('Yes')
    else:
        print('No')
except:
    print("No")
Problem p03477 (python)

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

if (g[0]+g[1])> (g[2]+g[3]):
    print("Left")
elif (g[0]+g[1])< (g[2]+g[3]):
    print("Right")
else:
    print("Balanced")

Buggy submission (verdict: Runtime Error):
A, B, C, D= [int(input() )for _ in range(4)]
D = A+B
E = C+D
if D>E:
    print("Left")
elif D<E:
    print("Right")
else:
    print("Balanced")

Buggy submission (verdict: Runtime Error):
A, B, C, D= [int(input() )for _ in range(4)]
if (A+B )> (C+D):
    print("Left")
elif (A+B )< (C+D):
    print("Right")
else:
    print("Balanced")