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

Fixed submission:
import bisect
import itertools
import sys


def most_simRL(ds, x):
    index = bisect.bisect_left(ds, x)
    if index == 0:
        return [ds[0]]
    elif index == len(ds):
        return [ds[-1]]
    return ds[index-1:index+1]

if __name__ == '__main__':
    A, B, Q = map(int, input().split())


    s_list = [-sys.maxsize] + [int(input()) for i in range(A)] + [sys.maxsize]
    t_list = [-sys.maxsize] + [int(input()) for i in range(B)] + [sys.maxsize]
    x_list = [int(input()) for i in range(Q)]


    for xi in x_list:
        s_RL = most_simRL(s_list, xi)
        t_RL = most_simRL(t_list, xi)

        answer = sys.maxsize

        for a, b in itertools.product(s_RL, t_RL):
            answer = min(answer, min(abs(xi-a), abs(xi-b)) + abs(a-b))

        print(answer)

Buggy submission (verdict: Runtime Error):
import math
import bisect
import itertools
import sys


def most_simRL(ds, x):
    index = bisect.bisect_left(ds, x)
    if index == 0:
        return [ds[0]]
    elif index == len(ds):
        return [ds[-1]]
    return ds[index-1:index+1]

if __name__ == '__main__':
    A, B, Q = map(int, input().split())


    s_list = [-math.inf] + [int(input()) for i in range(A)] + [math.inf]
    t_list = [-math.inf] + [int(input()) for i in range(B)] + [math.inf]
    x_list = [int(input()) for i in range(Q)]


    for xi in x_list:
        s_RL = most_simRL(s_list, xi)
        t_RL = most_simRL(t_list, xi)

        answer = sys.maxsize

        for a, b in itertools.product(s_RL, t_RL):
            answer = min(answer, min(abs(xi-a), abs(xi-b)) + abs(a-b))

        print(answer)

Buggy submission (verdict: Runtime Error):
if __name__ == '__main__':
    A, B, Q = map(int, input().split())

    s_list = [int(input()) for i in range(A)]
    t_list = [int(input()) for i in range(B)]
    x_list = [int(input()) for i in range(Q)]

    for xi in x_list:
        distance_ti_right_xi = [ti-xi for ti in t_list if ti >= xi]
        distance_ti_left_xi = [xi-ti for ti in t_list if ti <= xi]
        distance_si_right_xi = [si-xi for si in s_list if si >= xi]
        distance_si_left_xi = [xi-si for si in s_list if si <= xi]
        
        first_move = min(distance_si_left_xi, distance_si_right_xi, distance_ti_left_xi, distance_ti_right_xi)
        if first_move == distance_ti_left_xi or first_move == distance_si_left_xi:
            first_move = -1 * first_move
        xi += first_move

        if abs(first_move) == distance_si_left_xi or abs(first_move) == distance_si_right_xi:
            distance_ti_right_xi = [ti-xi for ti in t_list if ti >= xi]
            distance_ti_left_xi = [xi-ti for ti in t_list if ti <= xi]
            second_move = min(distance_ti_left_xi, distance_ti_right_xi)

        if abs(first_move) == distance_ti_left_xi or abs(first_move) == distance_ti_right_xi:
            distance_si_right_xi = [si-xi for si in s_list if si >= xi]
            distance_si_left_xi = [xi-si for si in s_list if si <= xi]
            second_move = min(distance_si_left_xi, distance_si_right_xi)
        answer = abs(first_move) + abs(second_move)
        print(answer)
Problem p03192 (python)

Fixed submission:
n=int(input())
ans=0
for i in range(4):
  if int(n%10)==2:
    ans+=1
  n=n/10
print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
ans=0
for i in range(4):
  if n%10=2:
    ans+=1
  n=n/10
print(ans)
Problem p03206 (python)

Fixed submission:
d = int(input())

if d==25:
  print('Christmas')
elif d==24:
  print('Christmas Eve')
elif d==23:
  print('Christmas Eve Eve')
elif d==22:
  print('Christmas Eve Eve Eve')

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

if d=25:
  print('Christmas')
elif d=24:
  print('Christmas Eve')
elif d=23:
  print('Christmas Eve Eve')
elif d=22:
  print('Christmas Eve Eve Eve')
Problem p03219 (python)

Fixed submission:
if __name__ == '__main__':
    X, Y = map(int, input().split())

    print(int(X+Y/2))

Buggy submission (verdict: Runtime Error):
if __name__ == '__main__':
    X, Y = map(int, input().split())

    print(int(X + y/2))
Problem p03243 (python)

Fixed submission:
if __name__ == '__main__':
    N = int(input())

    answer = -1
    for i in range(N, 1000):
        i_str = str(i)
        if i_str[0] == i_str[1] and i_str[1] == i_str[2]:
            answer = i_str
            break
    print(i_str)

Buggy submission (verdict: Runtime Error):
if __name__ == '__main__':
    N = int(input())

    answer = -1
    for i in range(N, 999):
        i_str = str(i)
        if i_str[0] == i_str[1] and i_str[1] == i_str[2]:
            answer = i_str
            break
    print(i_str)
Problem p03260 (python)

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

if (a*b)%2==1:
  print('Yes')
else:
  print('No')

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

if (a＊b)%2==1:
  print('Yes')
else:
  print('No')
Problem p03264 (python)

Fixed submission:
k = int(input())

if k == 0:
  print(0)
else:
  if k%2==0:
    even = k
    odd = k-1
  else:
    even = k - 1
    odd = k
  print(str((even//2)*((odd+1)//2)))

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

if k == 0:
  print(0)
else:
  even = k//2
  if k%2==0:
    odd = k-1
  else
    odd = k
  print(str(even*odd))

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

if k == 0:
  print(0)
else:
  even = k//2
  if k%2==0:
    odd = k-1
  else:
  odd = k
  print(str(even*odd))
Problem p03377 (python)

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

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

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

if a <= x <= a+b:
:(tnirp )"SEY"
  :esle
    )"ON@"(tnir
Problem p03380 (python)

Fixed submission:
import math
import sys


if __name__ == '__main__':
    n = int(input())
    a_list = list(map(int, input().split()))

    max_a = max(a_list)
    a_list.remove(max_a)

    min_diff = sys.maxsize
    answer1 = max_a
    answer2 = -1
    for i in range(n-1):
        diff = math.fabs(max_a/2 - a_list[i])
        if min_diff > diff:
            min_diff = diff
            answer2 = a_list[i]

    print(str(answer1) + " " + str(answer2))

Buggy submission (verdict: Runtime Error):
import math
import sys


if __name__ == '__main__':
    n = int(input())
    a_list = list(map(int, input().split()))

    max_comb = - sys.maxsize
    answer1 = -1
    answer2 = -1
    for i in range(n):
        for j in range(n):
            if i == j:
                continue
            if a_list[i] < a_list[j]:
                continue
            comb = math.factorial(a_list[i])/(math.factorial(a_list[j]) * math.factorial(a_list[i] - a_list[j]))

            if max_comb < comb:
                max_comb = comb
                answer1 = a_list[i]
                answer2 = a_list[j]

    print(str(answer1) + " " + str(answer2))
Problem p03399 (python)

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
d = int(input())

print(min(a,b)+min(c,d))

Buggy submission (verdict: Runtime Error):
a = int(intput())
b = int(intput())
c = int(intput())
d = int(intput()

print(min(a,b)+min(c,d))
Problem p03502 (python)

Fixed submission:
if __name__ == '__main__':
    N = input()

    fn = 0
    for i in range(len(N)):
        fn += int(N[i])

    if int(N) % fn == 0:
        print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
def f(N):
    res = 0
    while N//10 >= 1:
        res += N % 10
        N = N // 10
    return res


if __name__ == '__main__':
    N = int(input())

    if N % f(N) == 0:
        print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
def f(N):
    res = 0
    while N//10 > 0:
        res += N % 10
        N = N // 10
    return res


if __name__ == '__main__':
    N = int(input())

    if N % f(N) == 0:
        print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
def f(N):
    res = 0
    while N//10 > 0:
        res += N % 10
        N = N // 10
    return res


if __name__ == '__main__':
    N = int(input())

    if N % f(N) == 0:
        print('Yes')
    else:
        print('No')
Problem p03633 (python)

Fixed submission:
import fractions
from functools import reduce


def lcm(a,b):
    return (a*b)//fractions.gcd(a,b)


def lcm_list(a):
    return reduce(lcm,a)


if __name__ == '__main__':
    n = int(input())
    t = [int(input()) for i in range(n)]

    print(lcm_list(t))

Buggy submission (verdict: Runtime Error):
import math
from functools import reduce


def lcm(a,b):
    return (a*b)//math.gcd(a,b)


def lcm_list(a):
    return reduce(lcm,a)


if __name__ == '__main__':
    n = int(input())
    t = [int(input()) for i in range(n)]

    print(lcm_list(t))
Problem p03796 (python)

Fixed submission:
if __name__ == '__main__':
    N = int(input())
    ans = 1
    for i in range(1,N+1) :
        ans *= i
        # 剰余演算の分配則
        ans %= 1000000007
    ans %= 1000000007
    print(ans)

Buggy submission (verdict: Runtime Error):
import math
N = int(input())
fn = math.factorial(N)
ans = int(math.factorial(N)%(math.pow(10,9)+7))
print(ans)
Problem p03997 (python)

Fixed submission:
a=int(input())
b=int(input())
h=int(input())
 
print(((a+b)*h)//2)

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

print(((a+b)＊h)//2)
Problem p02675 (python)

Fixed submission:
i=input()
l=int(i[-1])

if l==3:
  print('bon')
elif l==0 or l==1 or l==6 or l==8:
  print('pon')
else:
  print('hon')

Buggy submission (verdict: Runtime Error):
i=input()
l=int(i[-1])

if l==3:
  print(bon)
elif l==0 or l==1 or l==6 or l==8:
  print(pon)
else:
  print(hon)
Problem p02993 (python)

Fixed submission:
count=0

security=input()
sec_list=list(security)

for s in range(0,len(security)-1):
    if sec_list[s]==sec_list[s+1]:
        count+=1

if count != 0:
    print("Bad")
else:
    print("Good")

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

for i in range(a, b):
    if i%c != 0:
        if i%d !=0:
            print(i)
Problem p02657 (python)

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

print(int(A*B))

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

ans = 1
 
for i in A:
    ans *= i
    if ans > 10**18:
        ans = -1
        break
print(ans)
Problem p02675 (python)

Fixed submission:
N = input()

a = int(N[-1])

if a == 3:
    print('bon')
elif a == 2 or a==4 or a==5 or a==7 or a==9:
    print('hon')
else:
    print('pon')

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

if N[-1] == 3:
    print('bon')
elif N[-1] == 2 or 4 or 5 or 7 or 9:
    print('hon')
else:
    print('pon')
Problem p02677 (python)

Fixed submission:
import math

A,B,H,M = map(int,input().split())
C2 = A**2+B**2-2*A*B*math.cos(math.radians(abs((30*H+M*0.5)-6*M)))
print(C2**0.5)

Buggy submission (verdict: Runtime Error):
A,B,H,M = map(int,input().split())
C2 = A**2+B**2-2*A*B*math.cos(math.radians(360-(30*H+M*0.5)-6*M))
print(C2**0.5)

Buggy submission (verdict: Runtime Error):
A,B,H,M = map(int,input().split())
C2 = A**2+B**2-2*A*B*math.cos(math.radians((30*H+M*0.5)-6*M))
print(C2**0.5)
Problem p02687 (python)

Fixed submission:
contest=input()
if contest == 'ABC':
    print('ARC')
elif contest == 'ARC':
    print('ABC')

Buggy submission (verdict: Runtime Error):
contest=input()
if contest == 'ABC':
    print('ARC')
elif contest == 'ARC':
    print('ABC)
Problem p02761 (python)

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

if N == 1:
    a = 0
elif N != 1:
    a = 10 **(N-1)

for i in range(a,10**N):
    count = 0
    str_i = str(i)
    for j in range(M):
        if str_i[sc[j][0]-1] == str(sc[j][1]):
            count += 1
    if count == M:
        print(i)
        exit()
print(-1)

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
sc = list([list(map(int,input().split())) for _ in range(M)])


for i in range(10**(N-1)-1,10**N):
    count = 0
    str_i = str(i)
    for j in range(M):
        if str_i[sc[j][0]-1] == str(sc[j][1]):
            count += 1
    if count == M:
        print(i)
        exit()
print(-1)

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
sc = list([list(map(int,input().split())) for _ in range(M)])


for i in range(10**(N-1)-1,10**N):
    count = 0
    str_i = str(i)
    for j in range(M):
        if str_i[sc[j][0]-1] == str(sc[j][1]):
            count += 1
    if count == M:
        print(i)
        exit()
print(-1)
Problem p02848 (python)

Fixed submission:
arb='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
N = int(input())
S = input()
ans =''
for i in range(len(S)):
    if arb.index(S[i]) + N +1 <= len(arb):
        ans += arb[arb.index(S[i])+N]
    else:
        ans += arb[-len(arb) + arb.index(S[i]) + N]
print(ans)

Buggy submission (verdict: Runtime Error):
arb='ABCDEFDHIJKLMNOPQRSTUVWXYZ'
N = int(input())
S = input()
ans =''
for i in range(len(S)):
    if arb.index(S[i]) + N +1 <= len(arb):
        ans += arb[arb.index(S[i])+N]
    else:
        ans += arb[-len(arb) + arb.index(S[i]) + N]
print(ans)
Problem p02924 (python)

Fixed submission:
N = int(input())

ans = ((N-1)*N//2)

print(ans)

Buggy submission (verdict: Runtime Error):
print((1+N)*(N/2))
Problem p02969 (python)

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

Buggy submission (verdict: Runtime Error):
N = int(input())
print(3*r**2)
Problem p02983 (python)

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

ans =[]
if R - L <= 2019:
    for i in range(L,R+1):
        for j in range(i+1,R+1):
            ans.append(i*j%2019)

else:
    for i in range(R-L-1010,R-L+1010):
        for j in range(i,R-L+1010):
            ans.append(i*j%2019)

print(min(ans))

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

ans =[]
    for i in range(L,R+1):
        for j in range(i+1,R+1):
            ans.append(i*j%2019)
            if i*j% 2019== 0 :
                exit()

print(min(ans))

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

ans =[]
if R - L <= 2019:
    for i in range(L,R+1):
        for j in range(i+1,R+1):
            ans.append(i*j%2019)
            if i*j% 2019== 0 :
                exit()

print(min(ans))

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

ans =[]
if R - L <= 2019:
    for i in range(L,R+1):
        for j in range(i+1,R+1):
            ans.append(i*j%2019)
            if i*j% == 0 :
                exit()

print(min(ans))
Problem p03001 (python)

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


if x != 0 and y != 0:
    if W/x == 2 and H/y ==2:
        print(W*H/2,'1')
    else:
        print(W*H/2,'0')
else:
    print(W*H/2,'0')

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

if W/x == 2 and H/y ==2:
    print(W*H/2,'1')
else:
    print(W*H/2,'0')
Problem p03031 (python)

Fixed submission:
N,M = map(int,input().split())
ks = [list(map(int,input().split())) for _ in range(M)]
p = list(map(int,input().split()))

ans = 0
for bit in range(1<<N):
    count = [0]*M
    for i in range(N):
        if (bit >> i) & 1:
            for a in range(M):
                if i+1 in ks[a][1:]:
                    count[a] +=1
    a = 0
    for i in range(M):
        if count[i] % 2 == p[i]:
            a += 1
            if a == M:
                ans += 1

print(ans)

Buggy submission (verdict: Runtime Error):
ans = 0
for bit in range(1<<N):
    count = [0]*M
    for i in range(N):
        if (bit >> i) & 1:
            for a in range(M):
                if i in ks[a][1:]:
                    count[a] +=1
    a = 0
    for i in range(M):
        if count[i] % 2 == p[i]:
            a += 1
            if a == M:
                ans += 1

print(ans)
Problem p03067 (python)

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

print('Yes' if A<C<B or B<C<A else 'No')

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

print('Yay!' if A <= 8 and B <= 8 else':(')
Problem p03219 (python)

Fixed submission:
X,Y = map(int,input().split())
print(int(X + Y/2))

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

print(N(N-1)//2+M(M-1)//2)
Problem p03433 (python)

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

if N - (N//500)*500 <= A:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
card = list(map(int,input().split()))
sorted_card = sorted(card)
Alice = 0
Bob = 0

for i in range(N):
    if i == 0 or i % 2 == 0:
        Alice += sorted_card[i]
    else:
        Bob += sorted_card[i]

print(Alice - Bob)

Buggy submission (verdict: Runtime Error):
N = int(input())
card = list(map(int,input().split()))
sorted_card = sorted(card)
Alice = 0
Bob = 0

for i in range(N):
    if i == 0 or i % 2 == 0:
        Alice += sorted_card[i]
    else:
        Bob += sorted_card[i]

print(Alice - Bob)
Problem p03470 (python)

Fixed submission:
N = int(input())
S = [int(input()) for _ in range(N)]

set_S = set(S)

print(len(set_S))

Buggy submission (verdict: Runtime Error):
N = int(input())
print(len(set(list(N))))
Problem p03471 (python)

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

ans = -1,-1,-1
for x in range(N+1):
    for y in range(N+1-x):
        z = N - x - y
        if 10000*x + 5000*y + 1000*z == Y:
            ans = x,y,z
            break
    else:
        continue

print(*ans)

Buggy submission (verdict: Runtime Error):
for x in range(N+1):
    for y in range(N+1-x):
        z = N - x - y
        if 10000*x + 5000*y + 1000*z == Y:
            ans = x,y,z
            break
    break
print(*ans)
Problem p03624 (python)

Fixed submission:
arb = 'abcdefghijklmnopqrstuvwxyz'
S = input()

ans =''
for i in arb:
    if i not in S:
        ans += i

sort_ans = sorted(ans)
if len(ans)==0:
    print('None')
else:
    print(sort_ans[0])

Buggy submission (verdict: Runtime Error):
arb = 'abcdefghijklmnopqrstuvwxyz'
S = input()
s_S =sorted(set(arb)^set(S))
print(s_S[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 = int(input())
if b-c == c-a:
    print('Yes')
else:
    print('No')
Problem p02608 (python)

Fixed submission:
n = int(input())
ans = [0] * n
s = max(4, n - 2)
import math
t = math.sqrt(s)
t = math.floor(t)
for i in range(1, t + 1):
    for j in range(i, t + 2):
        for k in range(j, t + 3):
            x = i ** 2 + j ** 2 + k ** 2 + i * j + j * k + k * i
            if x <= n:
                if i == j == k:
                    ans[x - 1] += 1
                elif i == j != k or i != j == k or i == k != j:
                    ans[x - 1] += 3
                elif i != k != j:
                    ans[x - 1] += 6
        
for i in ans:
    print(i)

Buggy submission (verdict: Runtime Error):
n = int(input())
ans = [0] * n
s = min(4, n - 2)
import math
t = math.sqrt(s)
t = math.floor(t)
for i in range(1, t + 1):
    for j in range(i, t + 2):
        for k in range(j, t + 3):
            x = i ** 2 + j ** 2 + k ** 2 + i * j + j * k + k * i
            if x <= n:
                if i == j == k:
                    ans[x - 1] += 1
                elif i == j != k or i != j == k or i == k != j:
                    ans[x - 1] += 3
                elif i != k != j:
                    ans[x - 1] += 6
        
for i in ans:
    print(i)
Problem p02612 (python)

Fixed submission:
s = str(input())
if len(s) >= 3:
    n = [s[-3], s[-2], s[-1]]
if len(s) == 2:
    n = [s[-2], s[-1]]
if len(s) == 1:
    n = [s[0]]
n = ''.join(n)
n = int(n)
if n == 0:
    print(0)
else:
    print(1000 - n)

Buggy submission (verdict: Runtime Error):
s = str(input())
n = [s[-3], s[-2], s[-1]]
n = ''.join(n)
n = int(n)
if n == 0:
    print(0)
else:
    print(1000 - n)
Problem p02614 (python)

Fixed submission:
import itertools
h, w, k = map(int, input().split())
p = [list(str(input())) for _ in range(h)]
bl = p.count('#')
bl = bl - k
ee = list(range(h))
q = list(range(w))
kotae = 0
pp = []
qq = []
for i in range(h + 1):
    pp += list(itertools.combinations(ee, i))
for i in range(w + 1):
    qq += list(itertools.combinations(q, i))
for i in pp:
    for j in qq:
        ans = 0
        for zz in range(h):
            for ww in range(w):
                if zz not in i:
                    if ww not in j:
                        if p[zz][ww] == '#':
                            ans += 1
        if ans == k:
            kotae += 1
print(kotae)

Buggy submission (verdict: Runtime Error):
h, w, k = map(int, input().split())
p = [list(str(input())) for _ in range(h)]
bl = p.count('#')
bl = bl - k
ee = list(range(h))
q = list(range(w))
kotae = 0
pp = []
qq = []
for i in range(h + 1):
    pp += list(itertools.combinations(ee, i))
for i in range(w + 1):
    qq += list(itertools.combinations(q, i))
for i in pp:
    for j in qq:
        ans = 0
        for zz in range(h):
            for ww in range(w):
                if zz not in i:
                    if ww not in j:
                        if p[zz][ww] == '#':
                            ans += 1
        if ans == k:
            kotae += 1
print(kotae)

Buggy submission (verdict: Runtime Error):
h, w, k = map(int, input().split())
p = [list(str(input())) for _ in range(h)]
bl = p.count('#')
bl = bl - k
ee = list(range(h))
q = list(range(w))
kotae = 0
pp = []
qq = []
for i in range(h + 1):
    pp += list(itertools.combinations(ee, i))
for i in range(w + 1):
    qq += list(itertools.combinations(q, i))
for i in pp:
    for j in qq:
        ans = 0
        for zz in range(h):
            for ww in range(w):
                if zz not in i:
                    if ww not in j:
                        if p[zz][ww] == '#':
                            ans += 1
        if ans == k:
            kotae += 1
print(kotae)
Problem p02640 (python)

Fixed submission:
a = list(map(int, input().split()))
if (4 * a[0] - a[1]) % 2 == 0 and 2 * a[0] >= (4 * a[0] - a[1]) >= 0:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
a = list(map(int, input().split()))
if (4 * a[0] - a[1]) % 2 == 0 and 2 * t >= (4 * a[0] - a[1]) >= 0:
    print('Yes')
else:
    print('No')
Problem p02642 (python)

Fixed submission:
from collections import Counter
import bisect
n = int(input()) #リストの要素数
a = list(map(int, input().split())) #リストの要素
cnt = Counter(a) #aの要素数についての辞書
a.sort()#aを小さい順にソート
ans = 0
mx = 10 ** 6
p = [0] * (mx + 1)
for i in a:
    if p[i] == 0:
        for j in range(mx + 1):
            x = i * j
            if x > mx:
                break
            p[x] = 1 #pの中でaの要素iの倍数として表現できるものに１
        if cnt[i] == 1:
            ans += 1 #pの中で任意のiの倍数として表現できず、かつ１つのみ存在するものをカウント
print(ans)

Buggy submission (verdict: Runtime Error):
from collections import Counter
import bisect
n = int(input()) #リストの要素数
a = list(map(int, input().split())) #リストの要素
cnt = Counter(a) #aの要素数についての辞書
a.sort()#aを小さい順にソート
ans = 0
mx = 10 ** 6
p = [0] * (mx + 1)
for i in a:
    if p[a] == 0:
        for j in range(mx + 1):
            x = i * j
            if x > mx:
                break
            p[x] = 1 #pの中でaの要素iの倍数として表現できるものに１
        if cnt[a] == 1:
            ans += 1 #pの中で任意のiの倍数として表現できず、かつ１つのみ存在するものをカウント
print(ans)