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

Fixed submission:
import fractions
import numpy as np
import os
import sys

n=int(input())
tt=[]
for i in range(n):
    a,b=input().split()
    tt.append([a,int(b)])
t=tt.copy()
t=sorted(t,key=lambda x: x[1],reverse=True)
t=sorted(t,key=lambda x: x[0])

for i in t:
    print(tt.index(i)+1)

Buggy submission (verdict: Runtime Error):
import fractions
import numpy as np
import os
import sys
from pandas import DataFrame

n=int(input())
d=[]
for i in range(n):
    a,b=input().split()
    t=[a,int(b),int(i)]
    d.append(t)

df=DataFrame(d)
df=df.sort_values(by=1,ascending=False)
df=df.sort_values(by=0)


df=df.iloc[:,2]
for i in df:
    print(i+1)
Problem p03262 (python)

Fixed submission:
import numpy as np
import fractions
from functools import reduce
import sys

def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)

n,z=map(int,input().split())
y=list(map(int,input().split()))

if(n==1):
    print(abs(y[0]-z))
    sys.exit()
y=np.array(y)
y=y-z
a=np.min(abs(y))
t=[]
for i in range(1,n):
    t.append(abs(y[i]-y[i-1]))

print(fractions.gcd(a,gcd_list(t)))

Buggy submission (verdict: Runtime Error):
import numpy as np
import fraction
from functools import reduce
import sys

def gcd_list(numbers):
    return reduce(fraction.gcd, numbers)

n,z=map(int,input().split())
y=list(map(int,input().split()))

if(n==1):
    print(abs(y[0]-z))
    sys.exit()
y=np.array(y)
y=y-z
t=[]
for i in range(1,n):
    t.append(abs(y[i]-y[i-1]))

print(gcd_list(t))
Problem p03273 (python)

Fixed submission:
import numpy as np

h,w=map(int,input().split())
tmp=[]
for i in range(h):
        a=list(input())
        tmp.append(a)
ans1=[]
if(w!=1):
    for i in range(h):
        if(len(set(tmp[i]))==1 and tmp[i][0]!="#"):
            ans1.append(i)
ans2=[]
tmp=list(map(list,zip(*tmp)))
if(h!=1):
    for i in range(w):
        if(len(set(tmp[i]))==1 and tmp[i][0]!="#"):
            ans2.append(i)
# print(ans1,ans2)
tmp=list(map(list,zip(*tmp)))
tmp=np.delete(tmp,ans1,axis=0)
tmp=np.delete(tmp,ans2,axis=1)
for i in range(len(tmp)):
    for j in range(len(tmp[0])):
        print(tmp[i][j],end="")
    print()

Buggy submission (verdict: Runtime Error):
\import numpy as np

h,w=map(int,input().split())
tmp=[]
for i in range(h):
        a=list(input())
        tmp.append(a)
ans1=[]
if(w!=1):
    for i in range(h):
        if(len(set(tmp[i]))==1 and tmp[i][0]!="#"):
            ans1.append(i)
ans2=[]
tmp=list(map(list,zip(*tmp)))
if(h!=1):
    for i in range(w):
        if(len(set(tmp[i]))==1 and tmp[i][0]!="#"):
            ans2.append(i)
# print(ans1,ans2)
tmp=list(map(list,zip(*tmp)))
tmp=np.delete(tmp,ans1,axis=0)
tmp=np.delete(tmp,ans2,axis=1)
for i in range(len(tmp)):
    for j in range(len(tmp[0])):
        print(tmp[i][j],end="")
    print()

Buggy submission (verdict: Runtime Error):
import numpy as np

h,w=map(int,input().split())
tmp=[]
for i in range(h):
        a=list(input())
        tmp.append(a)
ans1=[]
if(w!=1):
    for i in range(h):
        if(len(set(tmp[i]))==1):
            ans1.append(i)
ans2=[]
tmp=list(map(list,zip(*tmp)))
if(h!=1)
    for i in range(w):
        if(len(set(tmp[i]))==1):
            ans2.append(i)
# print(ans1,ans2)
tmp=list(map(list,zip(*tmp)))
tmp=np.delete(tmp,ans1,axis=0)
tmp=np.delete(tmp,ans2,axis=1)
for i in range(len(tmp)):
    for j in range(len(tmp[0])):
        print(tmp[i][j],end="")
    print()

Buggy submission (verdict: Runtime Error):
import numpy as np

h,w=map(int,input().split())
tmp=[]
for i in range(h):
        a=list(input())
        tmp.append(a)
ans1=[]
if(w!=1):
    for i in range(h):
        if(len(set(tmp[i]))==1):
            ans1.append(i)
ans2=[]
tmp=list(map(list,zip(*tmp)))
if(h!=1)
    for i in range(w):
        if(len(set(tmp[i]))==1):
            ans2.append(i)
# print(ans1,ans2)
tmp=list(map(list,zip(*tmp)))
tmp=np.delete(tmp,ans1,axis=0)
tmp=np.delete(tmp,ans2,axis=1)
for i in range(len(tmp)):
    for j in range(len(tmp[0])):
        print(tmp[i][j],end="")
    print()

Buggy submission (verdict: Runtime Error):
import numpy as np

h,w=map(int,input().split())
tmp=[]
for i in range(h):
        a=list(input())
        tmp.append(a)
ans1=[]
for i in range(w):
    if(len(set(tmp[i]))==1):
        ans1.append(i)
ans2=[]
tmp=list(map(list,zip(*tmp)))
for i in range(w):
    if(len(set(tmp[i]))==1):
        ans2.append(i)
tmp=list(map(list,zip(*tmp)))
tmp=np.delete(tmp,ans1,axis=0)
tmp=np.delete(tmp,ans2,axis=1)
for i in range(len(tmp)):
    for j in range(len(tmp[0])):
        print(tmp[i][j],end="")
    print()
Problem p03294 (python)

Fixed submission:
import fractions

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

n=int(input())
a=list(map(int,input().split()))
for i in range(n-1):    
    if(i==0):
        m=lcm(a[0],a[1])
    else:
        m=lcm(m,a[i+1])
m-=1
f=0
for i in range(n):
    f+=m%a[i]
print(f)

Buggy submission (verdict: Runtime Error):
import math

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

n=int(input())
a=list(map(int,input().split()))
for i in range(n-1):    
    if(i==0):
        m=lcm(a[0],a[1])
    else:
        m=lcm(m,a[i+1])
m-=1
f=0
for i in range(n):
    f+=m%a[i]
print(f)
Problem p03297 (python)

Fixed submission:
from fractions import gcd
n=int(input())
h=[]
for i in range(n):
    w=list(map(int,input().split()))
    h.append(w)
for i in range(n):
    a,b,c,d=h[i][0],h[i][1],h[i][2],h[i][3]
    if(b>a or b>d):
        print("No")
        continue
    if(b<=c):
        print("Yes")
        continue
    if(b-gcd(b,d)+a%gcd(b,d)<=c):print("Yes")
    else:print("No")
    continue

Buggy submission (verdict: Runtime Error):
import math
n=int(input())
h=[]
for i in range(n):
    w=list(map(int,input().split()))
    h.append(w)
for i in range(n):
    a,b,c,d=h[i][0],h[i][1],h[i][2],h[i][3]
    if(b>a or b>d):
        print("No")
        continue
    if(b<=c):
        print("Yes")
        continue
    if(b-math.gcd(b,d)+a%math.gcd(b,d)<=c):print("Yes")
    else:print("No")

Buggy submission (verdict: Runtime Error):
import math
n=int(input())
for i in range(n):
    a,b,c,d=map(int,input().split())
    if(b>a or b>d):
        print("No")
        continue
    if(b<=c):
        print("Yes")
        continue
    if(b-math.gcd(b,d)+a%math.gcd(b,d)<=c):print("Yes")
    else:print("No")
Problem p02760 (python)

Fixed submission:

A = [list(map(int, input().split())) for i in range(3)]
N = int(input())
b = [(int(input())) for _ in range(N)]

bingo1 = [0, 0, 0]
bingo2 = [0, 0, 0]
bingo3 = [0, 0, 0]

# 穴を開ける工程
for i in range(3):
  for j in range(N):
    if A[i][0] == b[j]:
      bingo1[i] = 1
    if A[i][1] == b[j]:
      bingo2[i] = 1
    if A[i][2] == b[j]:
      bingo3[i] = 1
      

# ビンゴ判定
if bingo1[0] == bingo1[1] == bingo1[2] == 1:
    print("Yes")
elif bingo2[0] == bingo2[1] == bingo2[2] == 1:
    print("Yes")
elif bingo3[0] == bingo3[1] == bingo3[2] == 1:
    print("Yes")
elif bingo1[0] == bingo2[0] == bingo3[0] == 1:
    print("Yes")
elif bingo1[1] == bingo2[1] == bingo3[1] == 1:
    print("Yes")
elif bingo1[2] == bingo2[2] == bingo3[2] == 1:
    print("Yes")
elif bingo1[0] == bingo2[1] == bingo3[2] == 1:
    print("Yes")
elif bingo1[2] == bingo2[1] == bingo3[0] == 1:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
A1 = list(map(int, input().split()))
A2 = list(map(int, input().split()))
A3 = list(map(int, input().split()))
N = input()
b = [(int(input())) for _ in range(N)]

print(A1)
Problem p03136 (python)

Fixed submission:
n = int(input())
l = list(map(int, input().split(' ')))
if max(l) < sum(l) - max(l):
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
n = int(input())
l = list(map(int, input().split(' ')))
if max(l) < sum(l) - max(l):
  print('Yes')
else
  print('No')

Buggy submission (verdict: Runtime Error):
n = int(input())
l = list(map(input().split(' '), int))
if max(l) < sum(l) - max(l):
  print('Yes')
else
  print('No')
Problem p03219 (python)

Fixed submission:
x = list(map(int, input().split(' ')))
print(int(x[0]+x[1]/2))

Buggy submission (verdict: Runtime Error):
x = map(int, input().split(' '))
print(int(x[0]+x[1]/2))
Problem p03262 (python)

Fixed submission:
from fractions import gcd
n, x = tuple(map(int, input().split(' ')))
d = 0
l = list(map(int, input().split(' ')))
for i in range(n):
  s = l[i]
  if i == 0:
    d = abs(s - x)
  else:
    d = gcd(d, abs(s-x))
print(d)

Buggy submission (verdict: Runtime Error):
from fractions import math
n, x = tuple(map(int, input().split(' ')))
d = 0
l = list(map(int, input().split(' ')))
for i in range(n):
  s = l[i]
  if i == 0:
    d = abs(s - x)
  else:
    d = math.gcd(d, s-x)
print(d)

Buggy submission (verdict: Runtime Error):
import math
n, x = tuple(map(int, input().split(' ')))
d = 0
l = list(map(int, input().split(' ')))
for i in range(n):
  s = l[i]
  if i == 0:
    d = s - x
  else:
    d = math.gcd(d, s-x)
print(d)

Buggy submission (verdict: Runtime Error):
import math
n, x = tuple(map(int, input().split(' ')))
d = 0
for i in range(n):
  s = int(input())
  if i == 0:
    d = s - x
  else:
    d = math.gcd(d, s-x)
print(d)
Problem p02848 (python)

Fixed submission:
N = int(input())
res = ""

for i in list(input()):
    ascii = ord(i)
    n = ascii - 65
    n = (n + N) % 26
    res += chr(n + 65)
print(res)

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

for i in list(input()):
    ascii = ord(i)
    n = ascii - 65
    n = (n + N) % 26
    res += chr(n + 65)
print(res == input())

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# Your code here!
N = int(input())
res = ""

for i in list(input()):
    ascii = ord(i)
    n = ascii - 65
    n = (n + N) % 26
    res += chr(n + 65)
print(res == input())
Problem p02982 (python)

Fixed submission:
from math import *
N,D = map(int,input().split())
lst = [[int(kk) for kk in input().split()] for aa in range(N)]
tot = 0
c = 0

for a in range(1,N):
    for b in range(a):
        c = 0
        for i in range(D):
            c += (lst[a][i] - lst[b][i])**2
        if sqrt(c) == int(sqrt(c)):
            tot += 1
print(tot)

Buggy submission (verdict: Runtime Error):
from math import *
N,D = map(int,input().split())
lst = [[int(kk) for kk in input().split()] for aa in range(N)]
tot = 0
c = 0
for a in range(1,N):
	for b in range(a):
      	c = 0
        for i in range(D):
			c += (lst[a][i]-lst[b][i])**2
        if sqrt(c) == int(sqrt(c)):
          	tot += 1
print(tot)

Buggy submission (verdict: Runtime Error):
N,D = map(int,input().split())
lst = [[int(kk) for kk in input().split()] for aa in range(N)]
tot = 0
c = 0
for a in range(N):
	for b in range(a):
      	c = 0
        for i in range(D):
			c += (lst[a][i]-lst[b][i])**2
        if sqrt(c) == int(sqrt(c)):
          	tot += 1
print(tot)
Problem p02994 (python)

Fixed submission:
import sys
input = sys.stdin.readline
N,L = map(int,input().split())
lst = [L]
for i in range(N-1):
  lst.append(lst[-1]+1)
arr = [abs(i) for i in lst]
del lst[arr.index(min(arr))]
print(sum(lst))

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
N,L = map(int,input().split())
lst = [L]
for i in range(n-1):
  lst.append(lst[-1]+1)
arr = [abs(i) for i in lst]
del lst[arr.index(min(arr))]
print(sum(lst))

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
N,L = map(int,input().split())
lst = [L]
for i in range(n-1):
  lst.append(lst[-1]-1)
arr = [abs(i) for i in lst]
del lst[arr.index(min(arr))]
print(sum(lst))
Problem p02795 (python)

Fixed submission:
h = int(input())
w = int(input())
n = int(input())

num1 = n/h
num2 = n/w

if not num1.is_integer():
  num1 = int(num1) + 1
  
if not num2.is_integer():
  num2 = int(num2) + 1
  
num1 = int(num1)
num2 = int(num2)
print(min(num1, num2))

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

num1 = n/h
num2 = n/w

if not num1.is_integer():
  num1 = int(num1) + 1
  
if not num2.is_integer():
  num2 = int(num2) + 1
  
return min(num1, num2)
Problem p02801 (python)

Fixed submission:
alp = "abcdefghijklmnopqrstuvwxyz"
C = input()
n = 0
while alp[n] != C:
    n += 1
print(alp[n+1])

Buggy submission (verdict: Runtime Error):
N,M = map(int, input().split())
ac = [0]*(N+1)
wa = 0
for i in range(M):
    p,s = input().split()
    p = int(p)
    if s == 'AC':
        if ac[p] != -1:
            ac[p] = -1
    else:
        if ac[p] != -1:
            wa +=1
print(ac.count(-1),wa)
Problem p02811 (python)

Fixed submission:
K,X = map(int,input().split())
if 500*K >= X:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
import fractions
from functools import reduce
N,M= map(int,input().split())
A=[int(x) for x in input().split()]
def lcmpair(a,b):
    return (a*b)// fractions.gcd(a,b)
def lcm(List):
    return reduce(lcmpair,List,1)
lcmB = lcm(A) //2

crit = 0
pena = 0
num = A[0]
while num%2 == 0:
    crit +=1
    num = num//2
count = 0
for i in A:
    count = 0
    while i%2 == 0 :
        count +=1
        i = i//2
    if count != crit:
        pena = 1

if lcmB > M:
    print(0)
elif pena ==1:
    print(0)
else:
    print(((M//lcmB)+1)//2)

Buggy submission (verdict: Runtime Error):
K,X = map(int,input().split())
if 500*K >= X:
    print(Yes)
else:
    print(No)
Problem p02813 (python)

Fixed submission:
from itertools import permutations
N = int(input())
P = tuple(int(x) for x in input().split())
Q = tuple(int(x) for x in input().split())
L = list(range(1,N+1))
R = list(permutations(L))
print(abs(R.index(P)-R.index(Q)))

Buggy submission (verdict: Runtime Error):
import itertools
N = int(input())
P = [int(x) for x in input().split()]
Q = [int(x) for x in input().split()]
R = [itertools.permutations(range(1,N+1))]
print(abs(r.idex(P)-r.index(Q)))
Problem p02885 (python)

Fixed submission:
A,B = map(int, input().split())
if A-2*B <= 0:
    print(0)
else:
    print(A-2*B)

Buggy submission (verdict: Runtime Error):
A,B = map(int, input().split())
if A-2*B <= 0:
    print(o)
else:
    print(A-2*B)
Problem p02995 (python)

Fixed submission:
import fractions
A,B,C,D = map(int, input().split())
BC = B//C
if A%C == 0:
    AC = A//C-1
else:    
    AC = A//C
BD = B//D
if A%D == 0:
    AD = A//D - 1
else:
    AD = A//D
GCD = C*D//fractions.gcd(C,D)
BB = B//GCD
if A%GCD == 0:
    AA = A//GCD - 1
else:
    AA = A//GCD
print((B-A+1)-(BC-AC)-(BD-AD)+(BB-AA))

Buggy submission (verdict: Runtime Error):
import math
A,B,C,D = map(int, input().split())
x = abs(A-B)//C + 1
y = abs(A-B)//D + 1
if abs(A-B)//((C*D)//math.gcd(C,D)) == 0:
    z = 0
else:
    z = abs(A-B)//((C*D)//math.gcd(C,D)) + 1
print(B-A+1-x-y+z)
Problem p03160 (python)

Fixed submission:
N = int(input())
H = [int(x) for x in input().split()]
dp = [0]*N
dp[0] = 0
dp[1] = abs(H[1]-H[0])
for i in range(2,N):
    dp[i] = min(dp[i-1]+abs(H[i]-H[i-1]),dp[i-2]+abs(H[i]-H[i-2]))
    
print(dp[N-1])

Buggy submission (verdict: Runtime Error):
N,W=map(int,input().split())
dp=[0]*(W+1)
L = sorted([list(map(int,input().split())) for i in range(N)])
s=0
 
for w, v in L:
    s+=w
    for j in range(min(W,s),w-1,-1):
        if dp[j-w]+v > dp[j]: dp[j]=dp[j-w]+v
    
print(max(dp))

Buggy submission (verdict: Runtime Error):
N,W=map(int,input().split())
dp=[0]*(W+1)
L = sorted([list(map(int,input().split())) for i in range(N)])
s=0
 
for w, v in L:
    s+=w
    for j in range(min(W,s),w-1,-1):
        if dp[j-w]+v > dp[j]: dp[j]=dp[j-w]+v
    
print(max(dp))
Problem p03163 (python)

Fixed submission:
N, W = map(int, input().split())
 
import numpy as np
dp = np.zeros(W + 1, dtype='int64')
 
for i in range(1, N + 1):
    w, v = map(int, input().split())
    dp[w:W+1] = np.maximum(dp[w:W+1], dp[:W-w+1] + v)
 
print(dp[-1])

Buggy submission (verdict: Runtime Error):
N,W=map(int,input().split())
dp=[0]*(W+1)
L = sorted([list(map(int,input().split())) for i in range(N)])
s=0
 
for w, v in L:
    s+=w
    for j in range(min(W,s),w-1,-1):
        if dp[j-w]+v > dp[j]: dp[j]=dp[j-w]+v
    
print(max(dp)
Problem p03166 (python)

Fixed submission:
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

N,M = map(int, input().split())
G = [[] for _ in range(N)]
for i in range(M):
    x, y = map(int, input().split())
    x, y = x-1, y-1
    G[x].append(y)
#G[i]は頂点iから辺でつながっている頂点のlist
def topological_sort(g):
    topological_list = []
    visited = set()

    def dfs(n):
        for e in g[n]:
            if e not in visited:
                dfs(e)
        topological_list.append(n)
        visited.add(n)
    
    for i in range(len(g)):
        if i not in visited:
            dfs(i)
        
    return topological_list[::-1]

T = topological_sort(G)
dist = [0]*N
for n in T:
    for v in G[n]:
        dist[v] = max(dist[v],dist[n]+1)       
        
print(max(dist))

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

N,M = map(int, input().split())
G = [[] for _ in range(N)]
for i in range(N):
    x, y = map(int, input().split())
    x, y = x-1, y-1
    G[x].append(y)
#G[i]は頂点iから辺でつながっている頂点のlist
def topological_sort(g):
    topological_list = []
    visited = list()

    def dfs(n):
        for e in g[n]:
            if e not in visited:
                dfs(e)
        topological_list.append(n)
        visited.append(n)
    
    for i in range(len(g)):
        if i not in visited:
            dfs(i)
        
    return topological_list[::-1]

T = topological_sort(G)
dist = [0]*N
for n in T:
    for v in G[n]:
        dist[v] = max(dist[v],dist[n]+1)       
        
print(max(dist),T)
Problem p03495 (python)

Fixed submission:
#!/usr/bin/python
#coding: utf-8

from collections import Counter

N, K = map(int, raw_input().split())
l = map(int, raw_input().split())

s = list(set(l))
num = range(len(s))
if len(s) <= K: print 0
else:
    counter = Counter(l)
    nums = counter.values()
    sousa = len(s)-K
    nums.sort()
    print sum(nums[:sousa])

Buggy submission (verdict: Runtime Error):
s = list(set(l))
num = range(len(s))
if len(s) <= K: print 0
else:
    for i in range(len(s)):
        num[i] = len([j for j in l if j == s[i]])
    sousa = len(s)-K
    num.sort()
    print sum(num[:sousa])
Problem p03854 (python)

Fixed submission:
print("YES") if input().replace("eraser", "").replace("erase", "").replace("dreamer", "").replace("dream", "") == "" else print("NO")

Buggy submission (verdict: Runtime Error):
print("YES") if input().replace("eraser", "").replace("erase", "").replace("dreamer", "").replace("dream", "") == "" else print("NO")
Problem p02724 (python)

Fixed submission:
def main():
    n = int(input())
    l = []
    
    if(n<0 or n>1000000000):
        main()
    
    
    if(n!=0):
        h1 = int(n/500)*1000
        ar = n - (int(n/500)*500)
        h1+=int(ar/5)*5
        h2 = int(n/5)*5
        
        l.append(h1)
        l.append(h2)
        print(max(l))
    else:
        print(0)

main()

Buggy submission (verdict: Runtime Error):
def main():
    n = int(input())
    l = []
    
    if(n<0 or n>1000000000):
        main()
    
    h1 = int(n/500)*1000
    ar = n - (h1/int(n/500))
    h1+=int(ar/5)*5
    h2 = int(n/5)*5

    l.append(h1)
    l.append(h2)
    print(max(l))

main()
Problem p02760 (python)

Fixed submission:
row1=list(map(int,input().split()))
row2=list(map(int,input().split()))
row3=list(map(int,input().split()))
bingo=row1+row2+row3
num=int(input())
num_list=set()
for i in range(num):
  num_list.add(int(input()))

bingo_list=[[0,3,6],[1,4,7],[2,5,8],[0,1,2],[3,4,5],[6,7,8],[0,4,8],[2,4,6]]
num_list=list(num_list)
for i in num_list:
  if i in bingo:
    bingo[bingo.index(i)] = True

for i in bingo_list:
  if bingo[i[0]] ==True and bingo[i[1]] == True and bingo[i[2]] == True:
    print('Yes')
    break
  if i == [2,4,6]:
    print('No')

Buggy submission (verdict: Runtime Error):
row1=list(map(int,input().split()))
row2=list(map(int,input().split()))
row3=list(map(int,input().split()))
bingo=row1+row2+row3
num=int(input())
num_list=set()
for i in range(num):
  num_list.add(int(input()))

bingo_list=[[0,3,6],[1,4,7],[2,5,8],[0,1,2],[3,4,5],[6,7,8],[0,4,8],[2,4,6]]
num_list=list(num_list)
for i in num_list:
  if i in bingo:
    bingo[bingo.index(i)] = True

for i in bingo_list:
  if bingo[i[0]] ==True and bingo[i[1]] == True and bingo[i[2]] == True:
    print('Yes')
    return 0

print('No')

Buggy submission (verdict: Runtime Error):
row1=list(map(int,input().split()))
row2=list(map(int,input().split()))
row3=list(map(int,input().split()))
bingo=row1+row2+row3
num=int(input())
num_list=set()
for i in range(num):
  num_list.add(int(input()))

bingo_list=[[0,3,6],[1,4,7],[2,5,8],[0,1,2],[3,4,5],[6,7,8],[0,4,8],[2,4,6]]
num_list=list(num_list)
for i in num_list:
  if i in bingo:
    bingo[bingo.index(i)] = True

for i in bingo_list:
  if bingo[i[0]] is True and bingo[i[1]] is True and bingo[i[2]] is True:
    print('Yes')
    return 0

print('No')

Buggy submission (verdict: Runtime Error):
row1=list(map(int,input().split()))
row2=list(map(int,input().split()))
row3=list(map(int,input().split()))
bingo=row1+row2+row3
num=int(input())
num_list=set()
for i in range(num):
  num_list.add(int(input()))

bingo_list=[[0,3,6],[1,4,7],[2,5,8],[0,1,2],[3,4,5],[6,7,8],[0,4,8],[2,4,6]]
  
for i in num_list:
  if i in bingo:
    bingo[bingo.index(i)] = True

for i in bingo_list:
  if bingo[i[0]] is True and bingo[i[1]] is True and bingo[i[2]] is True:
    print('Yes')
    return 0

print('No')

Buggy submission (verdict: Runtime Error):
row1=list(map(int,input().split()))
row2=list(map(int,input().split()))
row3=list(map(int,input().split()))
bingo=row1+row2+row3
num=int(input())
num_list={}
for i in range(num):
  num_list.add(int(input()))

bingo_list=[[0,3,6],[1,4,7],[2,5,8],[0,1,2],[3,4,5],[6,7,8],[0,4,8],[2,4,6]]
  
for i in num_list:
  if i in bingo:
    bingo[bingo.index(i)] = True

for i in bingo_list:
  if bingo[i[0]] is True and bingo[i[1]] is True and bingo[i[2]] is True:
    print('Yes')
    return 0

print('No')
Problem p02767 (python)

Fixed submission:
n=int(input())
list=list(map(int,input().split()))
min_tairyoku=10000000000000000000
tairyoku=[]
for i in range(min(list),max(list)+1):
    t=0
    for j in list:
        t += (j-i) ** 2
    tairyoku.append(t)
print(min(tairyoku))

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

ave=int(sum(list)/len()list)

ans=0
for i in list:
  ans+= pow((i-ave),2)

print(ans)

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

ave=int(sum(list)/len()list)

ans=0
[ans+= pow((i-ave),2) for i in list]

print(ans)
Problem p02724 (python)

Fixed submission:
# coding: UTF-8
import os

def remove_empty(target_list: list):
    empty_removed_list = [x for x in target_list if x]
    return empty_removed_list

def get_stdin_str_list():
    input_str = input().strip()
    input_str_list = input_str.split()
    return input_str_list

def get_stdin_int_list():
    input_str_list = get_stdin_str_list()
    input_int_list = list(map(int, input_str_list))
    return input_int_list

X = get_stdin_int_list()[0]
n_500 = int(X / 500)
X = X % 500
n_5 = int(X/5)

p = n_500*1000 + n_5*5
print(p)

Buggy submission (verdict: Runtime Error):
# coding: UTF-8
import os

def remove_empty(target_list: list):
    empty_removed_list = [x for x in target_list if x]
    return empty_removed_list

def get_stdin_str_list():
    input_str = input().strip()
    input_str_list = input_str.split()
    return input_str_list

def get_stdin_int_list():
    input_str_list = get_stdin_str_list()
    input_int_list = list(map(input_str_list, int))
    return input_int_list

X = get_stdin_int_list()[0]
n_500 = int(X / 500)
X = X % 500
n_5 = int(X/5)

p = n_500*1000 + n_5*5
print(p)

Buggy submission (verdict: Runtime Error):
# coding: UTF-8
import os

def remove_empty(target_list: list):
    empty_removed_list = [x for x in target_list if x]
    return empty_removed_list

def get_stdin_str_list():
    input_str = input().strip()
    input_str_list = input_str.split()
    return input_str_list

def get_stdin_int_list():
    input_str_list = get_stdin_str_list()
    input_int_list = list(map(input_str_list, int))
    return input_int_list

X = get_stdin_int_list()[0]
n_500 = int(X / 500)
X = X % 500
n_5 = int(X/5)

p = n_500*1000 + n_5*5