Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
#38
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
last = 9
time = 0
cou = 0
#l = [[A,"A"],[B,"B"],[C,"C"],[D,"D"],[E,"E"]]
l = [A,B,C,D,E]
for i in l:
    if i%10 !=0 :
        if last%10 >= i%10:
            last = i

l.remove(last)
l.append(last)
for i in range(5):
    time += l[i]
    if i == 4:
        break
    while time%10 != 0:
        time += 1
        
    
print(time)
        

Fixed submission:
#38
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
last = 9
time = 0
cou = 0
check = 0
#l = [[A,"A"],[B,"B"],[C,"C"],[D,"D"],[E,"E"]]
l = [A,B,C,D,E]
for i in l:
    if i%10 !=0 :
        if last%10 >= i%10:
            last = i
            check +=1
if check !=0:
    l.remove(last)
    l.append(last)
for i in range(5):
    time += l[i]
    if i == 4:
        break
    while time%10 != 0:
        time += 1
        
    
print(time)

Buggy python submission (verdict: Runtime Error):
#38
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
last = 9
time = 0
cou = 0
#l = [[A,"A"],[B,"B"],[C,"C"],[D,"D"],[E,"E"]]
l = [A,B,C,D,E]
for i in l:
    if i%10 !=0 :
        if last%10 > i%10:
            last = i

l.remove(last)
l.append(last)
for i in range(5):
    time += l[i]
    if i == 4:
        break
    while time%10 != 0:
        time += 1
        
    
print(time)
        

Fixed submission:
#38
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
last = 9
time = 0
cou = 0
check = 0
#l = [[A,"A"],[B,"B"],[C,"C"],[D,"D"],[E,"E"]]
l = [A,B,C,D,E]
for i in l:
    if i%10 !=0 :
        if last%10 >= i%10:
            last = i
            check +=1
if check !=0:
    l.remove(last)
    l.append(last)
for i in range(5):
    time += l[i]
    if i == 4:
        break
    while time%10 != 0:
        time += 1
        
    
print(time)

Buggy python submission (verdict: Runtime Error):
#38
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
last = 9
time = 0
cou = 0
#l = [[A,"A"],[B,"B"],[C,"C"],[D,"D"],[E,"E"]]
l = [A,B,C,D,E]
for i in l:
    if i%10 !=0 :
        if last%10 > i%10:
            last = i

l.remove(last)
l.append(last)
for i in range(5):
    time += l[i]
    if i == 4:
        break
    while time%10 != 0:
        time += 1
        
    
print(time)
        

Fixed submission:
#38
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
last = 9
time = 0
cou = 0
check = 0
#l = [[A,"A"],[B,"B"],[C,"C"],[D,"D"],[E,"E"]]
l = [A,B,C,D,E]
for i in l:
    if i%10 !=0 :
        if last%10 >= i%10:
            last = i
            check +=1
if check !=0:
    l.remove(last)
    l.append(last)
for i in range(5):
    time += l[i]
    if i == 4:
        break
    while time%10 != 0:
        time += 1
        
    
print(time)
Buggy python submission (verdict: Time Limit Exceeded):
#2
s = list(input())
l = len(s)
cnt = 0

for i in range(l*l):
    for j in range(l-1):
        if s[j] =="B" and s[j+1] == "W":
            cnt += 1
            s[j],s[j+1] = s[j+1],s[j]
            break
    else:
        break
print(cnt)

Fixed submission:
s=input()

ans=0
b_cnt=0
for i in range(len(s)):
  if s[i]=='B':
    b_cnt+=1
  else:
    ans+=b_cnt

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
#2
s = list(input())
l = len(s)
cnt = 0

for i in range(l*l):
    for j in range(l-1):
        if s[j] =="B" and s[j+1] == "W":
            cnt += 1
            s[j],s[j+1] = s[j+1],s[j]
            break
        
print(cnt)

Fixed submission:
s=input()

ans=0
b_cnt=0
for i in range(len(s)):
  if s[i]=='B':
    b_cnt+=1
  else:
    ans+=b_cnt

print(ans)

Buggy python submission (verdict: Runtime Error):
#2
s = list(input())
l = len(s)
cnt = 0

i = 0
for i in range(l)
    for j in range(l-1):
        if s[j] =="B" and s[j+1] == "W":
            cnt += 1
            s[j],s[j+1] = s[j+1],s[j]
            break
        break
print(cnt)

Fixed submission:
s=input()

ans=0
b_cnt=0
for i in range(len(s)):
  if s[i]=='B':
    b_cnt+=1
  else:
    ans+=b_cnt

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
#2
s = list(input())
l = len(s)
cnt = 0

i = 0
while i == 0:
    for j in range(l-1):
        if s[j] =="B" and s[j+1] == "W":
            cnt += 1
            s[j],s[j+1] = s[j+1],s[j]
            i = 0
            break
        i = 1
print(cnt)

Fixed submission:
s=input()

ans=0
b_cnt=0
for i in range(len(s)):
  if s[i]=='B':
    b_cnt+=1
  else:
    ans+=b_cnt

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
#2
s = list(input())
l = len(s)
cnt = 0

i = 0
while i == 0:
    for j in range(l-1):
        if s[j] =="B" and s[j+1] == "W":
            cnt += 1
            s[j],s[j+1] = s[j+1],s[j]
            i = 0
            break
        i = 1
print(cnt)

Fixed submission:
s=input()

ans=0
b_cnt=0
for i in range(len(s)):
  if s[i]=='B':
    b_cnt+=1
  else:
    ans+=b_cnt

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
#22
N,x = map(int,input().split())
a = list(map(int,input().split()))
cou =0

a.sort()

for i in a:
    if i >x:
        break
    cou +=1
    x -= i
    
while x>0:
    for i in a:
        if x%i ==0:
            cou -=1
            break
        while x > i:
            x-=i
        cou -= 1
print(cou)
    

Fixed submission:
#22
N,x = map(int,input().split())
a = list(map(int,input().split()))

a.sort()

if sum(a) ==x:
    print(N)
elif sum(a) < x:
    print(N-1)
else:
    for i in range(N):
        if sum(a[0:i+1]) >x:
            print(i)
            break
Buggy python submission (verdict: Runtime Error):
#10
n = int(input())
a = list(map(int,input().split()))
cnt = [0 for i in range(10**5)]

for i in a:
    cnt[i] += 1
    cnt[i+1] += 1
    cnt[i+2] += 1
    
print(max(cnt))
    

Fixed submission:
#10
n = int(input())
a = list(map(int,input().split()))
cnt = [0 for i in range(10**5+2)]

for i in a:
    cnt[i] += 1
    cnt[i+1] += 1
    cnt[i+2] += 1
    
print(max(cnt))
Buggy python submission (verdict: Runtime Error):
#16
n = int(input())
s = [int(input()) for i in range(n)]

Max = sum(s)
s = list(set(s))

if Max%10 ==0:
    for i in range(n):
        Max -= s[i]
        if Max%10 !=0:
            break
    
    
print(Max)

Fixed submission:
#16
n = int(input())
s = [int(input()) for i in range(n)]

Max = sum(s)
s.sort()

if Max%10 ==0:
    for i in range(n):
        if s[i]%10 != 0:
            Max -= s[i]
        if Max%10 !=0:
            break
if Max%10 == 0:
    Max = 0
    
print(Max)
Buggy python submission (verdict: Runtime Error):
#49
H,W = map(int,input().split())
a = []
for i in range(H):
    a.append(input())


for i in range(W+2):
    print("#",end = "")
print("")
for i in a:
    print("#",l,"#",sep = "")
for i in range(W+2):
    print("#",end = "")

Fixed submission:
#49 ボツ
H,W = map(int,input().split())
a = []
for i in range(H):
    a.append(input())


for i in range(W+2):
    print("#",end = "")
print("")
for i in a:
    print("#",i,"#",sep = "")
for i in range(W+2):
    print("#",end = "")
Buggy python submission (verdict: Runtime Error):
S = input()
cha = list(S)
plist = []

for i in cha:
    if i == "B":
        del plist[-1]
    else:
        plist.append(i)

plist = "".join(plist)

print(plist)

Fixed submission:
S = input()
cha = list(S)
plist = []

for i in cha: 
    if i == "B":
        if plist != []:
            del plist[-1]
    else:
        plist.append(i)
            
plist = "".join(plist)

print(plist)
Buggy python submission (verdict: Runtime Error):
N = int(input())
an = list(map(int,input().split()))
ave  = round((sum(an)/N),0)
ans = 0

for i in an:
    ans += (i-ave)**2

print(inst(ans))

Fixed submission:
N = int(input())
an = list(map(int,input().split()))
ave  = round((sum(an)/N),0)
ans = 0

for i in an:
    ans += (i-ave)**2

print(int(ans))

Buggy python submission (verdict: Runtime Error):
N = int(input())
an = list(map(int,input().split()))
ave  = round((sum(an)/N),0)
print(ave)
ans = 0

for i in an:
    ans += (i-ave)**2

print(inst(ans))

Fixed submission:
N = int(input())
an = list(map(int,input().split()))
ave  = round((sum(an)/N),0)
ans = 0

for i in an:
    ans += (i-ave)**2

print(int(ans))
Buggy python submission (verdict: Time Limit Exceeded):
#40
import sys
a,b = map(int,input().split())
cou = 0

if a<=0 and b>=0:
    print("Zero")
    sys.exit()
elif a>=0 and b<=0:
    print("Zero")
    sys.exit()
    
if a>0 and b>0:
    print("Positive")
    sys.exit()
else:
    cou = 1
    while a != b:
        cou +=1
    if cou %2 == 0:
        print("Positive")
    else:
        print("Negative")


Fixed submission:
#40
import sys
a,b = map(int,input().split())
cou = 0

if a<=0 and b>=0:
    print("Zero")
    sys.exit()
elif a>=0 and b<=0:
    print("Zero")
    sys.exit()
    
if a>0 and b>0:
    print("Positive")
    sys.exit()
else:
    cou = abs(b-a) +1
    if cou %2 == 0:
        print("Positive")
    else:
        print("Negative")
Buggy python submission (verdict: Runtime Error):
S=str(input())
T=str(input())
ls = []
cnt = 0
for i in range(len(S)-len(T)):
    cnt = 0
    for j in range(len(T)):
        if T[j] != S[j+i]:
            cnt += 1
    ls.append(cnt)
print(min(ls))


Fixed submission:
S=str(input())
T=str(input())
ls = []
cnt = 0
for i in range(len(S)-len(T)+1):
    cnt = 0
    for j in range(len(T)):
        #print(i,j)
        if T[j] != S[j+i]:
            #print(T[j],S[j+i])
            cnt += 1
    ls.append(cnt)
#print(ls)
print(min(ls))

Buggy python submission (verdict: Runtime Error):
S=str(input())
T=str(input())
ls = []
cnt = 0
if T in S:
    print(0)
else:
    for i in range(len(S)-len(T)):
        for j in range(len(T)):
            if T[j] != S[j+i]:
                #print (T[j],S[j+i])
                cnt += 1
        ls.append(cnt)
        cnt = 0
#print(ls)
    print(min(ls))


Fixed submission:
S=str(input())
T=str(input())
ls = []
cnt = 0
for i in range(len(S)-len(T)+1):
    cnt = 0
    for j in range(len(T)):
        #print(i,j)
        if T[j] != S[j+i]:
            #print(T[j],S[j+i])
            cnt += 1
    ls.append(cnt)
#print(ls)
print(min(ls))

Buggy python submission (verdict: Runtime Error):
S=str(input())
T=str(input())
ls = []
cnt = 0
if T in S:
    print(0)
else:
    for i in range(len(S)-len(T)):
        for j in range(len(T)):
            if T[j] != S[j+i]:
                #print (T[j],S[j+i])
                cnt += 1
        ls.append(cnt)
        cnt = 0
#print(ls)
print(min(ls))


Fixed submission:
S=str(input())
T=str(input())
ls = []
cnt = 0
for i in range(len(S)-len(T)+1):
    cnt = 0
    for j in range(len(T)):
        #print(i,j)
        if T[j] != S[j+i]:
            #print(T[j],S[j+i])
            cnt += 1
    ls.append(cnt)
#print(ls)
print(min(ls))
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(map(int,input().split()))
ans = 0
for i in range(N-1):
    ans += A[i]*(sum(A[i+1:]))
    #print(A[i+1:])
print(ans%((10**9)+7))


Fixed submission:
N=int(input())
A=list(map(int,input().split()))
sumA = sum(A)
ans = 0
for i in range(N-1):
    x = A[i]
    sumA -= x
    ans += sumA*x
print(ans%((10**9)+7))

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
N=int(input())
A=list(map(int,input().split()))
ans = 0
for i in range(N-1):
    x = A[i]
    for j in range(N-i-1):
        #print(i,j)
        ans += x*A[i+j+1]
        #print(x,A[j+i+1])
print(ans%((10**9)+7))


Fixed submission:
N=int(input())
A=list(map(int,input().split()))
sumA = sum(A)
ans = 0
for i in range(N-1):
    x = A[i]
    sumA -= x
    ans += sumA*x
print(ans%((10**9)+7))

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
N=int(input())
A=list(map(int,input().split()))
ans = 0
for i in itertools.combinations(A,2):
    ans += i[0]*i[1]
    #print(i[0],i[1])
#print(ans)
print(ans%((10**9)+7))


Fixed submission:
N=int(input())
A=list(map(int,input().split()))
sumA = sum(A)
ans = 0
for i in range(N-1):
    x = A[i]
    sumA -= x
    ans += sumA*x
print(ans%((10**9)+7))

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
N=int(input())
A=list(map(int,input().split()))
ans = 0
for i in itertools.combinations(A,2):
    ans += i[0]*i[1]
#print(ans)
print(ans%((10**9)+7))


Fixed submission:
N=int(input())
A=list(map(int,input().split()))
sumA = sum(A)
ans = 0
for i in range(N-1):
    x = A[i]
    sumA -= x
    ans += sumA*x
print(ans%((10**9)+7))
Buggy python submission (verdict: Runtime Error):
X=int(input())
if x >= 30:
    print("Yes")
else:
    print("No")


Fixed submission:
X=int(input())
if X >= 30:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int,input().split())
A = list(map(int,input().split()))
mae = 1
for i in range(K):
    mae *= A[i]
for i in range(N-K):
    ato = mae/A[i]*A[i+K]
    #mae = ato
    if ato > mae:
        print("Yes")
    else:
        print("No")
    mae = ato


Fixed submission:
N,K = map(int,input().split())
A = list(map(int,input().split()))
for i in range(N-K):
    if A[i] < A[i+K]:
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int,input().split())
A = list(map(int,input().split()))
mae = 1
for i in range(K):
    mae *= A[i]
for i in range(N-K):
    ato = mae/A[i]*A[i+K]
    if ato > mae:
        print("Yes")
    else:
        print("No")


Fixed submission:
N,K = map(int,input().split())
A = list(map(int,input().split()))
for i in range(N-K):
    if A[i] < A[i+K]:
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int,input().split())
A = list(map(int,input().split()))
for i in range(N-K):
    mae = 1
    ato = 1
    for j in range(K):
        #print(i,j)
        mae = mae*A[K-j+i-1]
        #print(A[K-j+i-1])
        ato = ato*A[K-j+i]
        #print(A[K-j+i])
    if mae < ato:
        print("Yes")
    else:
        print("No")


Fixed submission:
N,K = map(int,input().split())
A = list(map(int,input().split()))
for i in range(N-K):
    if A[i] < A[i+K]:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Runtime Error):
N,K = map(int,input().split())
list = list(map(int,input().split()))
list.sort(reverse=True)
seki = 1
seki1 = 1
seki2 = 1
if list[0] <= 0 and K % 2 != 0:
    for i in range(K):
        seki *= list[i]
elif N == K:
    for i in range(K):
        seki *= list[i]
else:
    for i in range(K):
        seki1 *= list[i]
    list.sort()
    for i in range(K):
        seki2 *= list[i]
    if (seki2 >= seki1) and (seki2 >= 0):
        seki = seki2
    elif (seki2 >= seki1) and (seki2 < 0):
        while seki2 < 0:
            i = 0
            seki2 = seki2 / list[i] * list[K+1+i]
            i += 1
        seki = seki2
    elif (seki1 > seki2) and (seki1 >= 0):
        seki = seki1
    else:
        list.sort(reverse=True)
        while seki1 < 0:
            i=0
            seki1 = seki1 / list[i] * list[K+1+i]
            i += 1
        seki = seki1

print(seki % ((10**9)+7))


Fixed submission:
N = int(input())

N = N - 1000
for j in range (10):
    if N - (1000*j) <= 0 :
        print(abs(N-(1000*j)))
        break
Buggy python submission (verdict: Runtime Error):
if input().isupper() = True:
    print(A)
else:
    print(a)


Fixed submission:
if input().isupper():
    print("A")
else:
    print("a")
Buggy python submission (verdict: Runtime Error):
A,B = map(float,input().split())
print(int(A*(B*100)/100)


Fixed submission:
import decimal
A,B = input().split()
A = decimal.Decimal(A)
B = decimal.Decimal(B)
print(int(A*B))

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


Fixed submission:
import decimal
A,B = input().split()
A = decimal.Decimal(A)
B = decimal.Decimal(B)
print(int(A*B))
Buggy python submission (verdict: Runtime Error):
7
nikoandsolstice

Fixed submission:
K=int(input())
S=str(input())
if len(S) <= K:
    print(S)
else:
    ans = S[0]
    for i in range(1,K):
        ans += S[i]
    ans += "..."
    print(ans)
Buggy python submission (verdict: Runtime Error):
import math
A,B,H,M = map(int,input().split())

a=[A*math.cos(math.radians(30*H+0.5*M),A*math.sin(math.radians(30*H+0.5*M))]
b=[B*math.cos(math.radians(M*60)),B*math.sin(math.radians(M*60))]
#print(a,b)
dir = ((a[0]-b[0])**2 + (a[1]-b[1])**2)**0.5
print(dir)


Fixed submission:
import math
A,B,H,M = map(int,input().split())
dega = (60*H+M)*(360/(60*12))
degb = M*(360/60)
a = [A*math.cos(math.radians(dega)),A*math.sin(math.radians(dega))]
b = [B*math.cos(math.radians(degb)),B*math.sin(math.radians(degb))]
dir = ((a[0]-b[0])**2 + (a[1]-b[1])**2)**0.5
print(dir)
Buggy python submission (verdict: Time Limit Exceeded):
A,B,C,K = map(int,input().split())
ls = []
ans = 0
for i in range(A):
    ls.append(1)
for i in range(B):
    ls.append(0)
for i in range(C):
    ls.append(-1)
for i in range(K):
    ans += ls[i]
print(ans)


Fixed submission:
A,B,C,K = map(int,input().split())
ans = 0
if A >= K:
    ans = K
elif A < K and A+B >= K:
    ans = A
else:
    ans = A - (K-A-B)*(1)
print(ans)
Buggy python submission (verdict: Runtime Error):
K=int(input())
A,B = map(int,input().split())
flg = False:
for i in range(A,B+1):
    if i%K == 0:
        flg = True:
if flg == True:
    print("OK")
else:
    print("NG")


Fixed submission:
K=int(input())
A,B = map(int,input().split())
flg = False
for i in range(A,B+1):
    if i%K == 0:
        flg = True
if flg == True:
    print("OK")
else:
    print("NG")
Buggy python submission (verdict: Runtime Error):
import math
x=int(input())
mon = 100
cnt = 0
while mon < X:
    mon = math.floor(mon*1.01)
    cnt += 1
print(cnt)


Fixed submission:
#import math
x=int(input())
mon = 100
cnt = 0
while mon < x:
    mon += mon//100
    cnt += 1
print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
S=[]
cnt = 0
for i in range(N):
    si= input()
    if si not in S:
        cnt += 1
        S.append(si)
print(cnt)


Fixed submission:
N=int(input())
cnt = 0
S=[]
for i in range(N):
    si= input()
    S.append(si)

print(len(list(set(S))))
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A = list(map(int,input().split()))
for i in range(1,N+1):
    print(A.count(i))


Fixed submission:
N=int(input())
A = list(map(int,input().split()))
ans = [0]*N
for i in range(len(A)):
    ans[A[i]-1] += 1
    #print(ans)
for i in range(N):
    print(ans[i])
Buggy python submission (verdict: Runtime Error):
N=int(input())
ans = []
for i in range(1,N+1):
    if i % 3 == 0 and i % 5 == 0:
        continue
    elif i % 3 == 0 and i % 5 != 0:
        continue
    elif i % 5 == 0 and i % 3 != 0:
        continue
    else:
        ans.appned(i)
print(sum(ans))


Fixed submission:
N=int(input())
ans = []
for i in range(1,N+1):
    if i % 3 == 0 and i % 5 == 0:
        continue
    elif i % 3 == 0 and i % 5 != 0:
        continue
    elif i % 5 == 0 and i % 3 != 0:
        continue
    else:
        ans.append(i)
print(sum(ans))
Buggy python submission (verdict: Time Limit Exceeded):
K = int(input())
ans = 0
for i in range(1,K+1):
    for j in range(1,K+1):
        for k in range(1,K+1):
            gcd = []
            #print(i,j,k)
            for l in range(1,min(i,j,k)+1):
                #print(i,j,k,l)
                if  i%l==0 and j%l==0 and k%l==0:
                    gcd.append(l)
                    #print(i,j,k,l)
                #print(gcd)
            ans += max(gcd)
print(ans)


Fixed submission:
K = int(input())
ans = 0
def gcd(a,b):
    if b == 0:
        return a
    else:
        return gcd(b,a%b)

for i in range(1,K+1):
    for j in range(1,K+1):
        gcd_ij = gcd(i,j)
        for k in range(1,K+1):
            ans += gcd(gcd_ij, k)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
S=str(input())
ans = 0
for i in range(N):
    for j in range(i,N):
        for k in range(j,N):
            if S[i]!=S[j] and S[i]!=S[k] and S[j]!=S[k] and j-i!=k-j:
                ans += 1
print(ans)


Fixed submission:
N=int(input())
S=str(input())
ans = S.count("R")*S.count("G")*S.count("B")
#print(ans)
for i in range(N-2):
    for j in range(i+1,N-1):
        k = 2*j-i
        #print(i,j,k)
        if k <= N-1:
            if S[i]!=S[j] and S[i]!=S[k] and S[j]!=S[k]:
                ans -= 1
print(ans)
Buggy python submission (verdict: Runtime Error):
ls=[]
for i in range(3):
    ls1=list(map(int,input().split()))
    ls.append(list(ls1))
    ls1.clear()
print(ls)
N=int(input())
for i in range(N):
    b = int(input())
    for j in range(3):
        for l in range(3):
        if ls[l][j] == b:
            ls[l][j] = -1
for i in range(3):
    if ls[i][0] == ls[i][1] == ls[i][2] == -1:
        print("Yes")
        break
    elif ls[0][i] == ls[1][i] == ls[2][i] == -1:
        print("Yes")
        break
    elif ls[0][0] == ls[1][1] == ls[2][2] == -1:
        print("Yes")
        break
    elif ls[0][2] == ls[1][1] == ls[2][0] == -1:
        print("Yes")
        break
    print("No")


Fixed submission:
ls=[]
for i in range(3):
    ls1=list(map(int,input().split()))
    ls.append(list(ls1))
    ls1.clear()
#print(ls)
N=int(input())
for i in range(N):
    b = int(input())
    for j in range(3):
        for l in range(3):
            if ls[l][j] == b:
                ls[l][j] = -1
flg = False
for i in range(3):
    if ls[i][0] == ls[i][1] == ls[i][2] == -1:
        print("Yes")
        flg = True
        break
    elif ls[0][i] == ls[1][i] == ls[2][i] == -1:
        print("Yes")
        flg = True
        break
    elif ls[0][0] == ls[1][1] == ls[2][2] == -1:
        print("Yes")
        flg = True
        break
    elif ls[0][2] == ls[1][1] == ls[2][0] == -1:
        print("Yes")
        flg = True
        break
if flg == False:
    print("No")
Buggy python submission (verdict: Runtime Error):
N = int(input())
X = list(map(int,input().split()))
ans = X **2
for i in range(1,100):
    sum = 0
    for j in range(N):
        sum += (X[j]-i)**2
    ans = min(ans,sum)
print(ans)


Fixed submission:
N = int(input())
X = list(map(int,input().split()))
#ans = 10000
ls = []
for i in range(1,100):
    sum = 0
    for j in range(N):
        sum += (X[j]-i)**2
    ls.append(sum)
    #print(ls)
    #ans = min(ans,sum)
print(min(ls))
Buggy python submission (verdict: Runtime Error):
N,K = map(int,input().split())
H = list(map(int,input().split()))
H.sort(reverse=True)
if N <= K:
    print(0)
#H.sort(reverse=True)
else:
    for i in range(K):
        #H.remove(max(H))
        H.pop(i)
        #print(H)
    print(sum(H))


Fixed submission:
from collections import deque
N,K = map(int,input().split())
H = list(map(int,input().split()))
H.sort(reverse=True)
deqH = deque(H)
if N <= K:
    print(0)
else:
    for i in range(K):
        deqH.popleft()
        #H.remove(max(H))
        #print(H)
    print(sum(deqH))

Buggy python submission (verdict: Runtime Error):
N,K = map(int,input().split())
H = list(map(int,input().split()))
if N <= K:
    print(0)
H.sort(reverse=True)
else:
    for i in range(K):
        #H.remove(max(H))
        H.pop(i)
        #print(H)
    print(sum(H))


Fixed submission:
from collections import deque
N,K = map(int,input().split())
H = list(map(int,input().split()))
H.sort(reverse=True)
deqH = deque(H)
if N <= K:
    print(0)
else:
    for i in range(K):
        deqH.popleft()
        #H.remove(max(H))
        #print(H)
    print(sum(deqH))

Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int,input().split())
H = list(map(int,input().split()))
if N <= K:
    print(0)
else:
    for i in range(K):
        H.remove(max(H))
        #print(H)
    print(sum(H))


Fixed submission:
from collections import deque
N,K = map(int,input().split())
H = list(map(int,input().split()))
H.sort(reverse=True)
deqH = deque(H)
if N <= K:
    print(0)
else:
    for i in range(K):
        deqH.popleft()
        #H.remove(max(H))
        #print(H)
    print(sum(deqH))