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

Fixed submission:
N,M = list(map(int,input().split()))
A = [list(map(int,input().split())) for i in range(N)]
A.sort()

ans = 0
for i in range(N):
	if M > A[i][1]:
		ans += A[i][0]*A[i][1]
		M -= A[i][1]
	else:
		ans += A[i][0]*M
		break

print(ans)

Buggy submission (verdict: Runtime Error):
N,M = list(map(int,input().split()))
d = {}
for i in range(N):
	k,l = list(map(int,input().split()))
	d[k] = l

e = sorted(d.items(),key = lambda x: x[0])

a= 0
ans = 0
for i in range(N):
	a += e[i][1]
	if M > a:
		ans += e[i][0]*e[i][1]
	else:
		ans += e[i][0]*(e[i][1]-a+M)
		break

print(ans)

Buggy submission (verdict: Runtime Error):
N,M = list(map(int,input().split()))
d = {}
for i in range(N):
	k,l = list(map(int,input().split()))
	d[k] = l

d = sorted(d.items(),key = lambda x: x[0])

a= 0
ans = 0
for i in range(N):
	a += d[i][1]
	if M > a:
		ans += d[i][0]*d[i][1]
	else:
		ans += d[i][0]* (d[i][1] - a +M)
		break

print(ans)
Problem p03240 (python)

Fixed submission:
n = int(input())
x = []
y = []
h = []
ans = [0,0,0]
for i in range(n):
	xyh = list(map(int, input().split()))
	x.append(xyh[0])
	y.append(xyh[1])
	h.append(xyh[2])

for i in range(101):
	for j in range(101):
		for k in range(n):
			if h[k] != 0:
				height = abs(i-x[k]) + abs(j-y[k]) + h[k]
				break
			
		flag = 0
		for k in range(n):
			if h[k] != max(height- abs(i-x[k]) - abs(j-y[k]) , 0):
				flag = 1
				break
			
		if flag == 0:
			ans = [i,j,height]
			break
		
	
print('{0} {1} {2}'.format(ans[0], ans[1], ans[2]))

Buggy submission (verdict: Runtime Error):
	h.append(xyh[2])

for i in range(101):
	for j in range(101):
		for k in range(n):
			if h[k] != 0:
				height = abs(i-x[k]) + abs(j-y[k]) + h[k]
				break
			
		flag = 0
		for k in range(n):
			if h[k] != max(height- abs(i-x[k]) - abs(j-y[k]) , 0):
				flag = 1
				break
			
		if flag == 0:
			ans = [i,j,height]
			break
		
	
print('{0} {1} {2}'.format(ans[0], ans[1], ans[2]))
Problem p04001 (python)

Fixed submission:
s = input()
sum = 0
for i in range(2**(len(s)-1)):
    term = 0
    for j in range(len(s)-1):
        term *= 10
        if (i//(2**j))%2 == 0:
            sum += term + int(s[j])
            term = 0
            if j == len(s)-2:
                sum += int(s[-1])
        else:
            term += int(s[j])
            if j == len(s)-2:
                sum += term*10 + int(s[-1])
if len(s) == 1:
    sum = int(s)

print(sum)

Buggy submission (verdict: Runtime Error):
s = input()
sum = 0
for i in range(2**(len(s)-1)):
    term = 0
    for j in range(len(s)-1):
        term *= 10
        if (i//(2**j))%2 == 0:
            sum += term + int(s[j])
            term = 0
            if j == len(s)-2:
                sum += int(s[-1])
        else:
            term += int(s[j])
            if j == len(s)-2:
                sum += term*10 + int(s[-1])
if len(s) = 1:
    sum = int(s)

print(sum)
Problem p02640 (python)

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

for a in range(0, x+1):
    for b in range(0, x+1-a):
        if a + b == x:
            if a*2 + b*4 == y:
                print('Yes')
                exit()

print('No')

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

for a in range(0, x+1):
    b = x - a
    if a*2 + b*4 == y:
        ans = 'Yes'
        break

print(ans)
Problem p02642 (python)

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

M = 10**6+5

count = [0]*M

for x in range(n):
    if count[a[x]] != 0:
        count[a[x]] = 2
        continue

    for i in range(a[x], M, a[x]):
        count[i] += 1

ans = 0
for x in range(n):
    if count[a[x]] == 1:
        ans += 1

print(ans)

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

a = list(set(a))
a = sorted(a, reverse=True)
ans = 0
count = 0

if len(a) != 1:
    for x in range(0, n-1):
        for y in range(x+1, n):
            if a[x] % a[y] == 0:
                break
            else:
                count += 1

        if count == n - x-1:
            ans += 1
        count = 0
    print(ans + 1)
else:
    print(0)
Problem p02802 (python)

Fixed submission:
from collections import deque

N, M = map(int,input().split())
ac = [0] * N
pena = [0] * N

for a in range(M):
    p,s = input().split()
    
    p = int(p) - 1

    if ac[p]:
        continue
    if s == 'AC':
        ac[p] = 1
    else:
        pena[p] += 1

AC = 0
PENA = 0

for a in range(N):
    AC += ac[a]
    if ac[a]:
        PENA += pena[a]

print(AC,PENA)

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

N, M = map(int,input().split())
ac = [0] * M
pena = [0] * M

for a in range(M):
    p,s = input().split()
    
    p = int(p) - 1

    if ac[p]:
        continue
    if s == 'AC':
        ac[p] = 1
    else:
        pena[p] += 1

AC = 0
PENA = 0

for a in range(N):
    AC += ac[a]
    if ac[a]:
        PENA += pena[a]

print(AC,PENA)

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

N, M = map(int,input().split())
ac = [0] * M
pena = [0] * M

for a in range(M):
    p,s = input().split()
    
    p = int(p) - 1

    if ac[p]:
        continue
    if s == 'AC':
        ac[p] = 1
    else:
        pena[p] += 1

AC = 0
PENA = 0

for a in range(M):
    AC += ac[a]
    if ac[a]:
        PENA += pena[a]

print(AC,PENA)

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

N, M = map(int,input().split())
ac = [0] * M
pena = [0] * M

for a in range(M):
    p,s = input().split()
    
    p = int(p) - 1

    if ac[p]:
        continue
    if s == 'AC':
        ac[p] = 1
    else:
        pena[p] += 1

AC = 0
PENA = 0

for a in ac:
    AC += a
    if a:
        PENA += pena[ac.index(a)]

print(AC,PENA)

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

N, M = map(int,input().split())
ac = [0] * M
pena = [0] * M

for a in range(M):
    p,s = input().split()
    
    p = int(p) - 1

    if ac[p]:
        continue
    if s == 'AC':
        ac[p] = 1
    else:
        pena[p] += 1

AC = 0
PENA = 0

for a in range(M):
    AC += ac[a]
    if ac[a]:
        PENA += pena[a]

print(AC,PENA)
Problem p03086 (python)

Fixed submission:
S = input()

N = len(S)
T = ['A', 'C', 'G', 'T']
ans = 0
now = 0

for a in S:
    isATCG = False
    if a in T:
        isATCG = True

    if isATCG:
        now += 1
        ans = max(ans, now)
    else:
        now = 0
        isATCG = False

print(ans)

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

length = 0
chain = -1
ans = []

for a in S:
    if a == 'A' or a == 'C' or a == 'G' or a == 'T':
        length += 1
        chain = 1
        continue
    else:
        chain = -1
        ans.append(length)
        length = 0

print(max(ans))
Problem p03106 (python)

Fixed submission:
A, B, K = map(int, input().split())


def gcd(a, b):
    x = max(a, b)
    y = min(a, b)
    mod = x % y
    if mod == 0:
        return y

    return gcd(y, mod)


mx = gcd(A, B)
count = 0

for a in range(mx, 0, -1):
    if A % a == 0 and B % a == 0:
        count += 1
    if count == K:
        ans = a
        break

print(ans)

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


def gcd(a, b):
    x = max(a, b)
    y = min(a, b)
    mod = x % y
    if mod == 0:
        return y

    return gcd(y, mod)


mx = gcd(A, B)
count = 0
for a in range(mx, 1, -1):
    print(a)
    if A % a == 0 and B % a == 0:
        count += 1
    if count == K:
        ans = a
        break
print(ans)

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


def gcd(a, b):
    x = max(a, b)
    y = min(a, b)
    mod = x % y
    if mod == 0:
        return y

    return gcd(y, mod)


mx = gcd(A, B)
count = 0
for a in range(mx+1, 1, -1):
    if A % a == 0 and B % a == 0:
        count += 1
    if count == K:
        ans = a
        break
print(ans)
Problem p03386 (python)

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

for x in range(a, min(b+1, a+k)):
    print(x)

for x in range(max(a+k, b-k+1), b+1):
    print(x)

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

num_list = list(range(a, b+1))

length = len(num_list)

for x in range(0, min(length, k)):
    print(num_list[x])

for x in range(max(k, length-k+1), length):
    print(num_list[x])

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

num_list = list(range(a, b+1))

length = len(num_list)

for x in range(0, min(length, k)):
    print(num_list[x])

for x in range(max(0, length-k), length):
    print(num_list[x])

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

num_list = list(range(a, b+1))

length = len(num_list)

for x in range(min(length, k)):
    print(num_list[x])

for x in range(max(k, length-k), length):
    print(num_list[x])

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

num_list = list(range(a, b+1))

length = len(num_list)

for x in range(min(length, k)):
    print(num_list[x])

for x in range(max(k, length-k+1), length):
    print(num_list[x])

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

num_list = list(range(a, b+1))

length = len(num_list)

for x in range(min(length, k)):
    print(num_list[x])

for x in range(max(k, length-k), length):
    print(num_list[x])
Problem p03408 (python)

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

for a in range(n):
    s.append(input())

t = list()
m = int(input())

for a in range(m):
    t.append(input())

kind = list(set(s))
kind_length = len(kind)

counter = dict()
for a in range(kind_length):
    counter[kind[a]] = 0

for a in range(n):
    counter[s[a]] += 1

for a in range(m):
    if t[a] not in counter:
        continue
    counter[t[a]] -= 1

print(max(max(counter.values()), 0))

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

for a in range(n):
    s.append(input())

t = list()
m = int(input())

for a in range(m):
    t.append(input())

kind = list(set(s))
kind_length = len(kind)

counter = dict()
for a in range(kind_length):
    counter[kind[a]] = 0

for a in range(n):
    counter[s[a]] += 1

for a in range(m):
    if t[a] not in counter:
        continue
    counter[t[a]] -= 1

print(max(counter.values(), 0))

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

for a in range(n):
    s.append(input())

t = list()
m = int(input())

for a in range(m):
    t.append(input())

kind = list(set(s))
kind_length = len(kind)

counter = dict()
for a in range(kind_length):
    counter[kind[a]] = 0

for a in range(n):
    counter[s[a]] += 1

for a in range(m):
    if t[a] not in counter:
        continue
    counter[t[a]] -= 1

print(max(counter.values(), 0))
Problem p03457 (python)

Fixed submission:
n = int(input())

t_list = [0]
x_list = [0]
y_list = [0]

for a in range(n):
    t, x, y = map(int, input().split())
    t_list.append(t)
    x_list.append(x)
    y_list.append(y)

for a in range(1, n+1):
    dt = t_list[a] - t_list[a-1]
    dx = x_list[a] - x_list[a-1]
    dy = y_list[a] - y_list[a-1]

    if abs(dx) + abs(dy) <= dt:
        if (dx + dy) % 2 == dt % 2:
            ans = True
        else:
            ans = False
            break
    else:
        ans = False
        break

if ans:
    print('Yes')
else:
    print('No')

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

t_list = list()
x_list = list()
y_list = list()

for a in range(n):
    t, x, y = map(int, input().split())
    t_list.append(t)
    x_list.append(x)
    y_list.append(y)

for a in range(1, n):
    dt = t_list[a] - t_list[a-1]
    dx = x_list[a] - x_list[a-1]
    dy = y_list[a] - y_list[a-1]

    if abs(dx) + abs(dy) <= dt:
        if (dx + dy) % 2 == dt % 2:
            ans = True
        else:
            ans = False
            break
    else:
        ans = False
        break

if ans:
    print('Yes')
else:
    print('No')

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

t_list = list()
x_list = list()
y_list = list()

for a in range(n):
    t, x, y = map(int, input().split())
    t_list.append(t)
    x_list.append(x)
    y_list.append(y)

for a in range(1, n):
    dt = t_list[a] - t_list[a-1]
    dx = x_list[a] - x_list[a-1]
    dy = y_list[a] - y_list[a-1]

    if abs(dx) + abs(dy) <= dt:
        if (dx + dy) % 2 == dt % 2:
            ans = True
        else:
            ans = False
            break
    else:
        ans = False
        break

if ans:
    print('Yes')
else:
    print('No')
Problem p03501 (python)

Fixed submission:
N,A,B = map(int,input().split())

print(min(N*A,B))

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

print(min(N*A,B))
Problem p03632 (python)

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

print(max(min(b, d) - max(a, c), 0))

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

print(max(min(b, d) - max(a, c)), 0)
Problem p03759 (python)

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

if b - a == c - b:
    print('YES')
else:
    print('NO')

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

if b-a == c - b:
    print('YES')
else:
    print('NO')
Problem p03778 (python)

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

if a <= b and b <= a + w:
    print(0)
elif a <= b + w and b + w <= a + w:
    print(0)
elif b+w < a:
    print(a - (b+w))
elif a+w < b:
    print(b - (a+w))

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

if a <= b and b <= a + w:
    print(0)
elif a <= b + w and b + w <= a + w
elif b+w < a:
    print(a - (b+w))
elif a+w < b:
    print(b - (a+w))
Problem p03844 (python)

Fixed submission:
A, op, B = input().split()

A = int(A)
B = int(B)

if op == '+':
    print(A+B)
else:
    print(A-B)

Buggy submission (verdict: Runtime Error):
A, op, B = input().split()

if op == '+':
    print(A+B)
else:
    print(A-B)
Problem p03998 (python)

Fixed submission:
from collections import deque

SA = deque(input())
SB = deque(input())
SC = deque(input())

NowCard = SA.popleft()
ans = 'A'

while True:
    if NowCard == 'a':
        NowList = SA
        ans = 'A'
    elif NowCard == 'b':
        NowList = SB
        ans = 'B'
    elif NowCard == 'c':
        NowList = SC
        ans = 'C'

    if len(NowList) == 0:
        break

    NowCard = NowList.popleft()

print(ans)

Buggy submission (verdict: Runtime Error):
SA = list(input())
SB = list(input())
SC = list(input())

LenSA = len(SA)
LenSB = len(SB)
LenSC = len(SC)

NowCard = SA.pop()

while True:
    if NowCard == 'a':
        NowList = SA
    elif NowCard == 'b':
        NowList = SB
    elif NowCard == 'c':
        NowList = SC

    NowCard = NowList.pop()

    if SA == [] or SB == [] or SC == []:
        break

if SA == []:
    print('A')
if SB == []:
    print('B')
if SC == []:
    print('C')
Problem p02796 (python)

Fixed submission:
# coding: utf-8
def main():
    n = int(input())
    inputs = [input().split() for i in range(n)]
    inputs_list = []
    for i in inputs:
        if int(i[0]) - int(i[1]) < 0:
            inputs_list.append([0, int(i[0]) + int(i[1])])
        else:
            inputs_list.append([int(i[0]) - int(i[1]), int(i[0]) + int(i[1])])
    sorted_data = sorted(inputs_list, key=lambda x: (x[1]))

    ans = [sorted_data[0]]
    cur = ans[0][1]
    for i in range(len(sorted_data) - 1):
        if cur <= sorted_data[i + 1][0]:
                ans.append(sorted_data[i + 1])
                cur = sorted_data[i + 1][1]
    print(len(ans))


if __name__ == '__main__':
    main()

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


def main():
    n = int(input())
    inputs = [input().split() for i in range(n)]
    inputs_list = []
    for i in inputs:
        if int(i[0]) - int(i[1]) < 0:
            inputs_list += (range(0, int(i[0]) + int(i[1])))
        else:
            inputs_list += (range(int(i[0]) - int(i[1]), int(i[0]) + int(i[1])))
    c = collections.Counter(inputs_list)
    print(n - (c.most_common()[0][1] - 1))


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

Fixed submission:
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
S = [_ for _ in input()]

left, right = 0, S[1:].count('E')
ans = left + right
for i in range(N-1):
    if S[i] == 'W':
        left += 1
    if S[i+1] == 'E':
        right -= 1

    ans = min(ans, left + right)

print(ans)

Buggy submission (verdict: Runtime Error):
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
S = [_ for _ in input()]

left_w = 0
right_e = S[1:].count('E')
min_sum = left_w + right_e

for i in range(N-1):
    if S[i] == 'W':
        left_w -= 1
    if S[i+1] == 'E':
        right_e += 1
    if min_sum < left_w + right_e:
        min_sum = left_w + right_e
        ans = i
print(ans)
Problem p03779 (python)

Fixed submission:
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

X = INT()

A = []
tmp = 0
for i in range(1, X+1):
    tmp += i
    A.append(tmp)
    if tmp >= X:
        print(i)
        break

Buggy submission (verdict: Runtime Error):
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

X = INT()

A = []
tmp = 0
for i in range(1, X):
    tmp += i
    A.append(tmp)
    if tmp > X:
        break

for i in range(1, len(A)+1):
    tmp += i
    if X <= A[i]:
        print(i+1)
        break
Problem p02621 (python)

Fixed submission:
def main():
    a = int(input())
    print(a+a**2+a**3)

main()

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

    n_list = list(map(int,input().split()))
    m_list = list(map(int,input().split()))
    a, b =[0],[0]
    for i in range(n):
        a.append(a[i]+n_list[i])
    for j in range(m):
        b.append(b[j]+m_list[j])
    
    j=m
    ans = 0
    for i in range(n+1):
        if a[i]>k:
            break
        while b[j]+a[i]>k:
            j -= 1
        ans = max(ans,i+j)
    print(ans)
main()
Problem p02630 (python)

Fixed submission:
import collections
n = int(input())
list_in = list(map(int, input().split()))
q = int(input())

counter = collections.Counter(list_in)
sum = sum(list_in)

for i in range(q):
    bc = list(map(int, input().split()))
#    list_in = [bc[1] if list_in[l] == bc[0] else list_in[l] for l in range(n)]
    sum_diff = (bc[1] - bc[0]) * counter[bc[0]]
    counter[bc[1]] = counter[bc[1]] + counter[bc[0]]
    counter[bc[0]] = 0
    print(sum+sum_diff)
    sum = sum + sum_diff

Buggy submission (verdict: Runtime Error):
n = int(input())
list_in = list(map(int, input().split()))
q = int(input())
for i in range(q+1):
    bc = list(map(int, input().split()))
    for j in range(n):
        if list_in[j] == bc[0]:
            list_in[j] = bc[1]
    print(sum(list_in))

Buggy submission (verdict: Runtime Error):
n = int(input())
list_in = list(map(int, input().split()))
q = int(input())
for i in range(q+1):
    b,c = input().split()
    b = int(b)
    c = int(c)
    for j in range(n):
        if list_in[j]==b:
            list_in[j]=c
    print(sum(list_in))
Problem p02639 (python)

Fixed submission:
in_list = list(map(int, input().split()))
for i in range(5):
  if in_list[i] ==0:
    print(i+1)

Buggy submission (verdict: Runtime Error):
x,y = int(input().split())
 
if x*4>y and y<x*2 and y%2 == 0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
C
Problem p02640 (python)

Fixed submission:
x,y = input().split()
 
x=int(x)
y=int(y)
count = 0
for i in range(x+1):
  if 2*i+4*(x-i) == y:
    print("Yes")
    count = 1

if count == 0:
	print("No")

Buggy submission (verdict: Runtime Error):
x,y = int(input().split())
 
if x*4>y and y<x*2 and y%2 == 0:
  print("Yes")
else:
  print("No")

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

if x*4>y and y<x*2 and y%2 == 0:
  print("Yes")
else:
  print("No")

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

if x*4>y and y%2 == 0:
  print("Yes")
else:
  print("No")

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

if x*4>y and y%2 ==0:
  print("Yes")
else:
  print("No")

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

if x*4<y and y%2 ==0:
  print("Yes")
else:
  print("No")

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

if x*4<y and y%2 ==0:
  print("Yes")
else:
  print"No")
Problem p02657 (python)

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

Buggy submission (verdict: Runtime Error):
a,b= input().split()
print(a*b)
Problem p03308 (python)

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

print(max(a)-min(a))

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

for i in range(100):
    if max_num < a[i]:
        max_num = a[i]
    elif min_num > a[i]:
        min_num =a[i]

print(max_num-min_num)
Problem p03493 (python)

Fixed submission:
in_s = str(input())
s0 = int(in_s[0])
s1 = int(in_s[1])
s2 = int(in_s[2])
 
print(s0+s1+s2)

Buggy submission (verdict: Runtime Error):
in = str(input())
s0 = int(in[0])
s1 = int(in[1])
s2 = int(in[2])

print(s0+s1+s2)
Problem p03636 (python)

Fixed submission:
s = input()
print(s[:1]+str(len(s)-2)+s[-1:])

Buggy submission (verdict: Runtime Error):
s = input()
print(s[:1]+str(len(s-2))+s[-1:])
Problem p02812 (python)

Fixed submission:
import sys

N = int(input())
S = input()

c = 0

for i in range(N-2):
    if S[i]=='A' and  S[i+1]=='B'and  S[i+2]=='C':
        c += 1

print(c)

Buggy submission (verdict: Runtime Error):
import sys

N = input()
S = input()

c = 0

for i in range(N-2):
    if S[i]=='A' and  S[i+1]=='B'and  S[i+2]=='C':
        c += 1

print(c)