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

Fixed submission:
N =int(input())

for i in range(0, 100//7):
    for j in range(0, 100//4):
        if 7*i + 4*j == N:
            print('Yes')
            exit()

print('No')

Buggy submission (verdict: Runtime Error):
if N % 4 == 0 or N % 7 == 0 or N % 11 == 0 or N % 4 == 7 or N % 7 == 4 or N % 11 == 7 or N % 11 == 4:
    print('Yes')   
else :
    print('No')
Problem p02811 (python)

Fixed submission:
k, x = (int(i) for i in input().split())
if k * 500 >= x:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
k = int(input())
x = int(input())
if k * 500 >= x:
    print("Yes")
else:
    print("No")
Problem p02993 (python)

Fixed submission:
s = input().strip()
for i in range(len(s)-1):
    if s[i] == s[i+1]:
        print("Bad")
        exit()
print("Good")

Buggy submission (verdict: Runtime Error):
s = input().strip()
for i in range(len(s)-1):
    if s[i] == s[i+1]:
        print("Bad")
        exit(1)
print("Good")

Buggy submission (verdict: Runtime Error):
s = input()
for i in range(len(s)-1):
    if s[i] == s[i+1]:
        print("Bad")
        exit(1)
print("Good")
Problem p02995 (python)

Fixed submission:
import fractions
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
abcd = input().split(" ")
a = int(abcd[0])
b = int(abcd[1])
c = int(abcd[2])
d = int(abcd[3])
cd = lcm(c, d)
print(b-a-(b//c-((a-1)//c + 1))-(b//d - ((a-1)//d + 1))+(b//cd-((a-1)//cd + 1)))

Buggy submission (verdict: Runtime Error):
import math


def lcm(x, y):
    return (x * y) // math.gcd(x, y)


abcd = input().split(" ")
a = int(abcd[0])
b = int(abcd[1])
c = int(abcd[2])
d = int(abcd[3])
cd = lcm(c, d)

print(b-a+1 - ((b+1)//c - a//c) - ((b+1)//d - a//d) + ((b+1)//cd - a//cd))

Buggy submission (verdict: Runtime Error):
import math
abcd = input().split(" ")
a = int(abcd[0])
b = int(abcd[1])
c = int(abcd[2])
d = int(abcd[3])
cd = (c*d)//math.gcd(c, d)
print(b-a+1 - ((b+1)//c - a//c) - ((b+1)//d - a//d) + ((b+1)//cd - a//cd))

Buggy submission (verdict: Runtime Error):
import math
abcd = input().split(" ")
a = int(abcd[0])
b = int(abcd[1])
c = int(abcd[2])
d = int(abcd[3])
cd = (c * d) // math.gcd(c, d)
print(b-a+1 - ((b+1)//c - a//c) - ((b+1)//d - a//d) + ((b+1)//cd - a//cd))
Problem p03029 (python)

Fixed submission:
ap = input().split()
print((int(ap[0])*3+int(ap[1]))//2)

Buggy submission (verdict: Runtime Error):
ap=input().split()
print((int(ap[0])＊3+int(ap[1]))//2)
Problem p02767 (python)

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

X.sort()

Xmin = min(X)
Xmax = max(X)

#print(Xmin,Xmax)

T =[]

for i in range(1,101):
    HP = 0
    for j in X:
        HP = HP + (i-j)**2
    T.append(HP)
print(min(T))

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

X.sort()

Xmin = min(X)
Xmax = max(X)

#print(Xmin,Xmax)

T =[]

for i in range(Xmin+1,Xmax+1):
    HP = 0
    for j in X:
        HP = HP + (i-j)**2
    T.append(HP)
print(min(T))
Problem p02719 (python)

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

if N > K:
    N = N - K*(N//K)

if N==K:
    print(0)
else:
    print(min(N,K-N))

Buggy submission (verdict: Runtime Error):


N, K = map(int, input().split())

if N > K:
    N = N - K*(N//K)

if N=K:
    print(0)
else:
    print(K-N)

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

k = math.gcd(N, K)

if K == 1:
    print(0)
else:
    print(k)

Buggy submission (verdict: Runtime Error):

import math
N, K = map(int, input().split())

#M=N

#for i in range(100000):
#    M = min(N,M)
#    N = abs(N-K)

#print(M)


k = math.gcd(N, K)

if K == 1:
    print(0)
else:
    print(k)
Problem p03635 (python)

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

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

Fixed submission:
inp = input().split()
A = int(inp[0])
B = int(inp[1])
if A+B >= 10:
  print('error')
else:
  print(A+B)

Buggy submission (verdict: Runtime Error):
inp = input().split
A = int(inp[0])
B = int(inp[1])
if(A+B >= 10):
  print('error')
else:
  print(A+B)
Problem p02756 (python)

Fixed submission:
from collections import deque
s = list(input())
q_num = int(input())

s_deq = deque(s)
reversed = False

for _ in range(q_num):
    query = input().split()
    if query[0] == '1':
        reversed = False if reversed else True
    elif query[0] == '2':
        if not reversed:
            if query[1] == '1':
                s_deq.appendleft(query[2])
            elif query[1] == '2':
                s_deq.append(query[2])
        else:
            if query[1] == '2':
                s_deq.appendleft(query[2])
            elif query[1] == '1':
                s_deq.append(query[2])
if reversed:
    s_deq.reverse()
print(''.join(s_deq))

Buggy submission (verdict: Runtime Error):
from collections import deque
s = list(input())
q_num = int(input())

s_deq = deque(s)
reversed = False

for _ in range(q_num):
    query = input().split()
    if query[0] == '1':
        reversed = False if reversed else True
    elif query[0] == '2':
        if not reversed:
            if query[1] == '1':
                s_deq.insert(0, query[2])
            elif query[1] == '2':
                s_deq.append(query[2])
        else:
            if query[1] == '2':
                s_deq.insert(0, query[2])
            elif query[1] == '1':
                s_deq.append(query[2])
if reversed:
    s_deq.reverse()
print(''.join(s_deq))
Problem p02760 (python)

Fixed submission:
def resolve():
    a = []
    for _ in range(3):
        a.append(list(map(int, input().split())))
    n = int(input())
    b = []
    for _ in range(n):
        b.append(int(input()))

    check = [[False] * 3 for _ in range(3)]

    for b_one in b:
        for i in range(3):
            for j in range(3):
                if a[i][j] == b_one:
                    check[i][j] = True

    if check[0][0] and check[0][1] and check[0][2]:
        print('Yes')
        return
    if check[1][0] and check[1][1] and check[1][2]:
        print('Yes')
        return
    if check[2][0] and check[2][1] and check[2][2]:
        print('Yes')
        return
    if check[0][0] and check[1][0] and check[2][0]:
        print('Yes')
        return
    if check[0][1] and check[1][1] and check[2][1]:
        print('Yes')
        return
    if check[0][2] and check[1][2] and check[2][2]:
        print('Yes')
        return
    if check[0][0] and check[1][1] and check[2][2]:
        print('Yes')
        return
    if check[0][2] and check[1][1] and check[2][0]:
        print('Yes')
        return

    print('No')

resolve()

Buggy submission (verdict: Runtime Error):
a = []
for _ in range(3):
    a.append(list(map(int, input().split())))
n = int(input())
b = []
for _ in range(n):
    b.append(int(input()))

check = [[False] * 3 for _ in range(3)]

for b_one in b:
    for i in range(3):
        for j in range(3):
            if a[i][j] == b_one:
                check[i][j] = True

if check[0][0] and check[0][1] and check[0][2]:
    print('Yes')
    return
if check[1][0] and check[1][1] and check[1][2]:
    print('Yes')
    return
if check[2][0] and check[2][1] and check[2][2]:
    print('Yes')
    return
if check[0][0] and check[1][0] and check[2][0]:
    print('Yes')
    return
if check[0][1] and check[1][1] and check[2][1]:
    print('Yes')
    return
if check[0][2] and check[1][2] and check[2][2]:
    print('Yes')
    return
if check[0][0] and check[1][1] and check[2][2]:
    print('Yes')
    return
if check[0][2] and check[1][1] and check[2][0]:
    print('Yes')
    return

print('No')
Problem p02782 (python)

Fixed submission:
r1, c1, r2, c2 = map(int, input().split())

p = 10 ** 9 + 7
size = 1010000 * 2
f_list = [1] * size
for i in range(1, size):
    f_list[i] = (f_list[i - 1] * i) % p

def cmb(n, r):
    return f_list[n + r] * pow(f_list[n], p-2, p) * pow(f_list[r], p-2, p) % p

hole = cmb(r2 + 1, c2 + 1) - 1
rect1 = cmb(r2 + 1, c1) - 1
rect2 = cmb(r1, c2 + 1) - 1
duplicate = cmb(r1, c1) - 1
ans = (hole - rect1 - rect2 + duplicate) % p
print(ans)

Buggy submission (verdict: Runtime Error):
#from scipy.special import comb
r1, c1, r2, c2 = map(int, input().split())
#mod = 1000000007
#hole = (comb(r2 + c2 + 2, r2 + 1, exact=True) - 1) % mod
#rect1 = (comb(r2 + c1 - 1 + 2, r2 + 1, exact=True) - 1) % mod
#rect2 = (comb(r1 - 1 + c2 + 2, r1, exact=True) - 1) % mod
#duplicate = (comb(r1 + c1, r1, exact=True) - 1) % mod
#ans = (hole - rect1 - rect2 + duplicate) % mod

p = 10 ** 9 + 7
N = 10 ** 6  # N は必要分だけ用意する
fact = [1, 1]
factinv = [1, 1]
inv = [0, 1]

for i in range(2, N + 1):
    fact.append((fact[-1] * i) % p)
    inv.append((-inv[p % i] * (p // i)) % p)
    factinv.append((factinv[-1] * inv[-1]) % p)

def cmb(n, r, p):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n - r] % p

hole = (cmb(r2 + c2 + 2, r2 + 1, p) - 1)
rect1 = (cmb(r2 + c1 - 1 + 2, r2 + 1, p) - 1)
rect2 = (cmb(r1 - 1 + c2 + 2, r1, p) - 1)
duplicate = (cmb(r1 + c1, r1, p) - 1)
ans = (hole - rect1 - rect2 + duplicate) % p
print(ans)

Buggy submission (verdict: Runtime Error):
from scipy.misc import comb
r1, c1, r2, c2 = map(int, input().split())
mod = 1000000007
hole = (comb(r2 + c2 + 2, r2 + 1, exact=True) - 1) % mod
rect1 = (comb(r2 + c1 - 1 + 2, r2 + 1, exact=True) - 1) % mod
rect2 = (comb(r1 - 1 + c2 + 2, r1, exact=True) - 1) % mod
duplicate = (comb(r1 + c1, r1, exact=True) - 1) % mod
ans = (hole - rect1 - rect2 + duplicate) % mod
print(ans)

Buggy submission (verdict: Runtime Error):
from scipy.special import comb
r1, c1, r2, c2 = map(int, input().split())
mod = 1000000007
hole = (comb(r2 + c2 + 2, r2 + 1, exact=True) - 1) % mod
rect1 = (comb(r2 + c1 - 1 + 2, r2 + 1, exact=True) - 1) % mod
rect2 = (comb(r1 - 1 + c2 + 2, r1, exact=True) - 1) % mod
duplicate = (comb(r1 + c1, r1, exact=True) - 1) % mod
ans = (hole - rect1 - rect2 + duplicate) % mod
print(ans)
Problem p03361 (python)

Fixed submission:
h, w = map(int, input().split())
s_input = []
for i in range(h):
    s_input.append(input())

can_draw = True

for i in range(h):
    for j in range(w):
        if s_input[i][j] == '#':
            if i - 1 >= 0:
                if s_input[i - 1][j] == '#':
                    #ok
                    continue
            if j - 1 >= 0:
                if s_input[i][j - 1] == '#':
                    #ok
                    continue
            if j + 1 < w:
                if s_input[i][j + 1] == '#':
                    #ok
                    continue
            if i + 1 < h:
                if s_input[i + 1][j] == '#':
                    #ok
                    continue
            can_draw = False
            break
    if not can_draw:
        break

print('Yes' if can_draw else 'No')

Buggy submission (verdict: Runtime Error):
h, w = map(int, input().split())
s_input = []
for i in range(h):
    s_input.append(input())

can_draw = True

for i in range(h):
    for j in range(w):
        if s_input[i][j] == '#':
            if i - 1 >= 0:
                if s_input[i-1][j] == '#':
                    #ok
                    continue
            if j - 1 >= 0:
                if s_input[i][j - 1] == '#':
                    #ok
                    continue
            if j + 1 <= w:
                if s_input[i][j + 1] == '#':
                    #ok
                    continue
            if i + 1 <= h:
                if s_input[i + 1][j] == '#':
                    #ok
                    continue
            can_draw = False
            break
    if not can_draw:
        break

print('Yes' if can_draw else 'No')
Problem p03565 (python)

Fixed submission:
s = input()
t = input()

s_len = len(s)
t_len = len(t)

result = ''
match = False
for i in range(s_len - t_len, -1, -1):
    match = False
    s_part = s[i:i + t_len]
    for j in range(t_len + 1):
        if j == t_len:
            result = (s[0:i] + t + s[i + t_len:]).replace('?', 'a')
            match = True
            break
        if s_part[j] == '?':
            continue
        if s_part[j] != t[j]:
            match = False
            break
    if match:
        break

print(result if match else 'UNRESTORABLE')

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

s_len = len(s)
t_len = len(t)

result = ''
for i in range(s_len - t_len, -1, -1):
    match = False
    s_part = s[i:i + t_len]
    for j in range(t_len + 1):
        if j == t_len:
            result = (s[0:i] + t + s[i + t_len:]).replace('?', 'a')
            match = True
            break
        if s_part[j] == '?':
            continue
        if s_part[j] != t[j]:
            match = False
            break
    if match:
        break

print(result if match else 'UNRESTORABLE')

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

s_len = len(s)
t_len = len(t)

result = ''
for i in range(s_len - t_len, -1, -1):
    match = False
    s_part = s[i:i + t_len]
    for j in range(t_len + 1):
        if j == t_len:
            result = (s[0:i] + t + s[i + 5:]).replace('?', 'a')
            match = True
            break
        if s_part[j] == '?':
            continue
        if s_part[j] != t[j]:
            match = False
            break
    if match:
        break

print(result if match else 'UNRESTORABLE')
Problem p04001 (python)

Fixed submission:
s = input()
n = len(s) - 1
sum = 0

for bit in range(1 << n):
    eval_str = ''
    eval_str += s[0]
    for i in range(n):
        if bit & (1 << i):
            eval_str += '+'
        eval_str += s[i + 1]
    sum += eval(eval_str)

print(sum)

Buggy submission (verdict: Runtime Error):
s = input()
n = len(s) - 1
sum = 0

if n == 0:
    print(s)
    return

for bit in range(1 << n):
    eval_str = ''
    for i in range(n):
        eval_str += s[i]
        if bit & (1 << i):
            eval_str += '+'
    eval_str += s[i + 1]
    sum += eval(eval_str)

print(sum)

Buggy submission (verdict: Runtime Error):
s = input()
n = len(s) - 1
sum = 0

for bit in range(1 << n):
    eval_str = ''
    for i in range(n):
        eval_str += s[i]
        if bit & (1 << i):
            eval_str += '+'
    eval_str += s[i + 1]
    sum += eval(eval_str)

print(sum)
Problem p02713 (python)

Fixed submission:
def gcb(a, b):
    if a < b:
        a, b = b, a
    if b == 0:
        gcb_table[a][b] = a
    else:
        if gcb_table[a][b] == -1:
            gcb_table[a][b] = gcb(b, a%b)
    return gcb_table[a][b]

k = int(input())
gcb_table = [[-1 for _ in range(k+1)] for _ in range(k+1)]

for i in range(1, k+1):
    for j in range(1, k+1):
        temp = gcb(i, j)
        gcb_table[i][j] = temp
        gcb_table[j][i] = temp
        
res = 0
for a in range(1, k+1):
    for b in range(1, k+1):
        gcb_first = gcb_table[a][b]
        for c in range(1, k+1):
            res += gcb_table[gcb_first][c]
print(res)

Buggy submission (verdict: Runtime Error):
from itertools import product
 
def gcb(a, b):
    if a < b:
        a, b = b, a
    if b == 0:
        gcb_table[a][b] = a
    else:
        if gcb_table[a][b] == -1:
            gcb_table[a][b] = gcb(b, a%b)
    return gcb_table[a][b]

k = int(input())
gcb_table = [[-1 for _ in range(k+1)] for _ in range(k+1)]

for i in range(1, k+1):
    for j in range(1, k+1):
        temp = gcb(i, j)
        gcb_table[i][j] = temp
        gcb_table[j][i] = temp
        
res = 0
l_k = range(1, k+1)
for part in itertools.product(l_k, l_k, l_k):
    gcb_first = gcb_table[part[0]][part[1]]
    res += gcb_table[gcb_first][part[2]]
print(res)

Buggy submission (verdict: Runtime Error):
from itertools import product
 
def gcb(a, b):
  	if a < b:
      	a, b = b, a
    if b == 0:
        gcb_table[a][b] = a
    else:
        if gcb_table[a][b] == -1:
            gcb_table[a][b] = gcb(b, a%b)
    return gcb_table[a][b]
  
k = int(input())
gcb_table = [[-1 for _ in range(k+1)] for _ in range(k+1)]
 
for i in range(1, k+1):
    for j in range(1, k+1):
        temp = gcb(i, j)
        gcb_table[i][j] = temp
        gcb_table[j][i] = temp
        
res = 0
l_k = range(1, k+1)
for part in itertools.product(l_k, l_k, l_k):
    gcb_first = gcb_table[part[0]][part[1]]
    res += gcb_table[gcb_first][part[2]]
print(res)

Buggy submission (verdict: Runtime Error):
from itertools import product
 
def gcb(a, b):
    if b == 0:
        gcb_table[a][b] = a
    else:
        if gcb_table[a][b] == -1:
            gcb_table[a][b] = gcb(b, a%b)
    return gcb_table[a][b]

def gcb_3(a, b, c):
    return gcb(gcb(a, b), gcb(b, c))
  
k = int(input())
gcb_table = [[-1 for _ in range(k+1)] for _ in range(k+1)]

for i in range(1, k+1):
    for j in range(1, k+1):
        temp = gcb(i, j)
        gcb_table[i][j] = temp
        gcb_table[j][i] = temp
        
res = 0
l_k = range(1, k+1)
for part in itertools.product(l_k, l_k, l_k):
    gcb_first = gcb_table[part[0]][part[1]]
    res += gcb_table[gcb_first][part[2]]
print(res)

Buggy submission (verdict: Runtime Error):
from itertools import product

def gcb(a, b):
    if b == 0:
        return a
    return gcb(b, a % b)

def gcb_3(a, b, c):
    return gcb(gcb(a, b), gcb(b, c))

k = int(input())
res = 0
l_k = range(1, k+1)
for part in itertools.product(l_k, l_k, l_k):
    res += gcb_3(part[0], part[1], part[2])
print(res)
Problem p03962 (python)

Fixed submission:
#!C:\Users\daichi\Anaconda3/python.exe
# -*- coding: utf-8 -*-

C = input().split()
a = C[0]
b = C[1]
c = C[2]

k=3
if(a == b and b == c):
    k = 1
elif(a == b and b != c):
    k = 2
elif(a == c and b != c):
    k = 2
elif(b == c and a != c):
    k = 2
else:
    k=3
print(k)

Buggy submission (verdict: Runtime Error):
#!C:\Users\daichi\Anaconda3/python.exe
# -*- coding: utf-8 -*-

C = input().split()
a = C[0]
b = C[1]
c = C[1]

if(a == b and a == c):
    k = 3
if(a == c and a != b):
    k = 2 
if(a != b and c != b):
    k = 1

print(k)
Problem p02718 (python)

Fixed submission:
n, m = list(map(int, input().split(" ")))
a_list = sorted(list(map(int, input().split(" "))), reverse=True)
if m == 0:
    print('Yes')
else:
    if a_list[m-1] >= sum(a_list) / (4 * m):
        print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
m, n = list(map(int, input().split(" ")))
a_list = list(map(int, input().split(" "))).sort(reverse=True)
if m == 0:
    print('Yes')
else:
    if a_list[m-1] >= sum(a_list) / (4 * m):
        print('Yes')
    else:
        print('No')
Problem p02719 (python)

Fixed submission:
n, k = list(map(int, input().split(" ")))
n = n - k * (n // k)
n_last = abs(n - k)
if n_last < n:
    n = n_last
print(n)

Buggy submission (verdict: Runtime Error):
n, k = list(map(int, input().split(" ")))
a = abs(n - k)
n = n - a * (n // a)
n_last = abs(n - k)
if n_last < n:
    n = n_last
print(n)

Buggy submission (verdict: Runtime Error):
n, k = list(map(int, input().split(" ")))
a = abs(n-k)
n = n - a * (n // a)
print(n)
Problem p03145 (python)

Fixed submission:
a, b, c = list(map(int, input().split()))
print(a*b//2)

Buggy submission (verdict: Runtime Error):
print(eval("*".join(list(map(int, input().split()))[:2]))//2)
Problem p03363 (python)

Fixed submission:
def solve(A):
    cumsum = [0]
    for elem in A:
        cumsum.append(cumsum[-1]+elem)
    d = dict()
    for i in cumsum:
        try:
            d[i] += 1
        except:
            d[i] = 1
    res = 0
    for value in d.values():
        res += (value * (value - 1)) // 2
    return res

def main():
    N = int(input())
    A = list(map(int, input().split()))
    res = solve(A)
    print(res)

main()

Buggy submission (verdict: Runtime Error):
   def solve(A):
    cumsum = [0]
    for elem in A:
        cumsum.append(cumsum[-1]+elem)
    d = dict()
    for i in cumsum:
        try:
            d[i] += 1
        except:
            d[i] = 1
    res = 0
    for value in d.values():
        res += (value * (value - 1)) // 2
    return res

def main():
    N = int(input())
    A = list(map(int, input().split()))
    res = solve(A)
    print(res)

main()
Problem p02909 (python)

Fixed submission:
inp = input()
 
arr = ['Sunny','Cloudy','Rainy']
 
if inp == 'Sunny':
  print (arr[1])
elif inp == 'Cloudy':
  print (arr[2])
elif inp == 'Rainy':
  print (arr[0])

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

arr = ['Sunny','Cloudy','Rainy']

if inp == 'Sunny':
  print arr[1]
elif inp == 'Cloudy':
  print arr[2]
elif inp == 'Rainy':
  print arr[0]
Problem p02760 (python)

Fixed submission:
import sys
import math
from io import StringIO
import unittest

lines = [[0,1,2], [3,4,5], [6,7,8],[0,3,6],[1,4,7],[2,5,8],[0,4,8],[2,4,6]]

def resolve():
    table = [int(s) for s in input().split()]
    table += [int(s) for s in input().split()]
    table += [int(s) for s in input().split()]

    lis = [int(input()) for _ in range(int(input()))]

    ans = [ n in lis for n in table ]

    for line in lines:
        valid = True
        for num in line:
            if not ans[num] :
                valid = False
                break

        if valid:
            print('Yes')
            return

    print('No')
resolve()

Buggy submission (verdict: Runtime Error):
import sys
import math
from io import StringIO


lines = [[0,1,2], [3,4,5], [6,7,8],[0,3,6],[1,4,7],[2,4,8],[0,4,8],[2,4,6]]

table = [int(s) for s in input().split()]
table += [int(s) for s in input().split()]
table += [int(s) for s in input().split()]

lis = [int(input()) for _ in range(int(input()))]

ans = [ n in lis for n in table ]

for line in lines:
  valid = True
  for num in line:
    if not ans[num] :
      valid = False
      break

      if valid:
        print('Yes')
        return

      print('No')

Buggy submission (verdict: Runtime Error):

lines = [[0,1,2], [3,4,5], [6,7,8],[0,3,6],[1,4,7],[2,4,8],[0,4,8],[2,4,6]]

table = [int(s) for s in input().split()]
table += [int(s) for s in input().split()]
table += [int(s) for s in input().split()]

lis = [int(input()) for _ in range(int(input()))]

ans = [ n in lis for n in table ]

for line in lines:
  valid = True
  for num in line:
    if not ans[num] :
      valid = False
      break

      if valid:
        print('Yes')
        return

      print('No')
Problem p02818 (python)

Fixed submission:
import sys
from io import StringIO
import unittest

def resolve():
    inp = input().split()
    a = int(inp[0])
    b = int(inp[1])
    k = int(inp[2])

    if (a - k) <= 0 :
        k = k - a
        a = 0
    else:
        a = a - k
        k = 0

    if (b - k) <= 0:
        k = k - b
        b = 0
    else:
        b = b - k
        k = 0

    print(str(a) + ' ' + str(b))

if __name__ == "__main__":
    resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    inp = input().split()
    a = int(inp[0])
    b = int(inp[1])
    k = int(inp[2])

    if (a - k) <= 0 :
        k = k - a
        a = 0
    else:
        a = a - k
        k = 0

    if (b - k) <= 0:
        k = k - b
        b = 0
    else:
        b = b - k
        k = 0

    print(str(a) + ' ' + str(b))

    
if __name__ == "__main__":
    reslove()
Problem p02718 (python)

Fixed submission:
n,m=map(int,input().split())
a=[int(i) for i in input().split()]
count=0
 
A=sum(a)/(4*m)
for i in a:
  if i>=A:
    count+=1
if count>=m:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
a=[int(i) for i in input().split()]
count=0
 
A=sum(a)//(4*m)
for i in a:
  if a[i]>=A:
    count+=1
if count>=m:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
a=[int(i) for i in input().split()]
count=0

A=sum(a)//(4＊m)
for i in range(n):
  if a[i]>A:
    count+=1
if count>=m:
  print("Yes")
else:
  print("No")
Problem p02731 (python)

Fixed submission:
l=float(input())
print((l/3)**3)

Buggy submission (verdict: Runtime Error):
=int(input())
if l==1:
    print(float(1))
else:
    print(l/3**3)

Buggy submission (verdict: Runtime Error):
l=int(input())
if l==1:
    print(float(1))
else:
    print(l/3**3):