Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
n,m,k = map(int, input().split())

from collections import deque

an = list(map(int, input().split()))

bn = list(map(int, input().split()))

an = [0] + an
bn = bn

vMax = 10**9+10

import itertools

accum_a = [0]
accum_b = [0]



candidate = []


for b_i in range(0,len(bn)):
    i_ = accum_b[-1] + bn[b_i]
    if i_ > k:
        break
    accum_b.append(i_)

accum_b.reverse()

countMax = 0
for a_i in range(0,len(an)):


    sumCandidate = accum_a[-1] + an[a_i]
    if sumCandidate > k:
        break
    accum_a.append(sumCandidate)

    rest = k - sumCandidate

    bIndex = 0
    for j, accB in enumerate(accum_b):
        if accB <= rest:
            bIndex = len(accum_b) - 1 - j
            break


    countMax = max(countMax, a_i + bIndex)



print(countMax)

Fixed submission:
n,m,k = map(int, input().split())

from collections import deque

an = list(map(int, input().split()))

bn = list(map(int, input().split()))

accum_a = [0]
accum_b = [0]


for a_i in range(0,len(an)):

    sumCandidate = accum_a[-1] + an[a_i]
    if sumCandidate > k:
        break
    accum_a.append(sumCandidate)

for b_i in range(0,len(bn)):
    i_ = accum_b[-1] + bn[b_i]
    if i_ > k:
        break
    accum_b.append(i_)

j = len(accum_b) - 1
ans = 0
for i in range(len(accum_a)):

    if accum_a[i] > k:
        break

    while accum_b[j] > k - accum_a[i]:
        j -= 1

    ans = max(ans, i+j)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,m,k = map(int, input().split())

from collections import deque

an = list(map(int, input().split()))

bn = list(map(int, input().split()))

an = an
bn = bn

vMax = 10**9+10

import itertools

accum_a = [0]
accum_b = [0]

dp = [[0]*200003]*200003
candidate = []
for a_i in range(0,len(an)):


    sumCandidate = accum_a[-1] + an[a_i]
    if sumCandidate > k:
        break
    accum_a.append(sumCandidate)

for b_i in range(0,len(bn)):
    accum_b.append(accum_b[-1]+ bn[b_i])

countMax = 0
for i, aSum in enumerate(accum_a):
    rest = k - aSum

    bIndex = 0
    for j, accB in enumerate(accum_b):
        if accB > rest:
            bIndex = max(0, j-1)
            break
        bIndex = j

    countMax = max(countMax, i + bIndex)

print(countMax)

Fixed submission:
n,m,k = map(int, input().split())

from collections import deque

an = list(map(int, input().split()))

bn = list(map(int, input().split()))

accum_a = [0]
accum_b = [0]


for a_i in range(0,len(an)):

    sumCandidate = accum_a[-1] + an[a_i]
    if sumCandidate > k:
        break
    accum_a.append(sumCandidate)

for b_i in range(0,len(bn)):
    i_ = accum_b[-1] + bn[b_i]
    if i_ > k:
        break
    accum_b.append(i_)

j = len(accum_b) - 1
ans = 0
for i in range(len(accum_a)):

    if accum_a[i] > k:
        break

    while accum_b[j] > k - accum_a[i]:
        j -= 1

    ans = max(ans, i+j)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
number = int(input())
# values = [i+2 for i in range(2*10**5)]
values = list(map(int, input().split()))

maxV = 10**6+1
dp = [0]*(maxV)

for a in values:
    i = 1
    if dp[a] > 1:
        continue
    while i * a < maxV:
        i_a = i * a
        dp[i_a] = dp[i_a] + 1
        i += 1

count = 0
for a in values:
    if dp[a] == 1:
        count+=1

print(count)


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

maxV = 10**6+1
dp = [0]*(maxV)

for a in values:
    i = 1
    if dp[a] > 0:
        dp[a] = dp[a] + 1
        continue
    while i * a < maxV:
        i_a = i * a
        dp[i_a] = dp[i_a] + 1
        i += 1

count = 0
for a in values:
    if dp[a] == 1:
        count+=1

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

aList = []
bList = []
for i in range(n):
    a, b = map(int, input().split())
    aList.append(a)
    bList.append(b)

aList.sort()
bList.sort()

half = n // 2
if not n % 2 == 0:
    print(bList[half] - aList[half] + 1)
else:
    print(bList[half] + bList[half+1] - aList[half] + aList[half+1] + 1)



Fixed submission:
n = int(input())

aList = []
bList = []
for i in range(n):
    a, b = map(int, input().split())
    aList.append(a)
    bList.append(b)

aList.sort()
bList.sort()


if not n % 2 == 0:
    half = (n+1) // 2 - 1
    print(bList[half] - aList[half] + 1)
else:
    half = (n) // 2 - 1
    print(bList[half] + bList[half+1] - (aList[half] + aList[half+1]) + 1)
Buggy python submission (verdict: Time Limit Exceeded):
# 32:35
n = int(input())

heights = list(map(int, input().split()))

values = dict()

for ii, h in enumerate(heights):
    c1 = ii - h
    if (c1) in values:
        values[c1].append((ii, h))
    else:
        values[c1] = [(ii, h)]

count = dict()
for j, h in enumerate(heights):
    if (j + h) in values:
        for i, ai in values[j + h]:
            if i > 0 and i > j and not (j, i) in count:
                count[(j, i)] = True


print(len(count))

Fixed submission:
# 32:35
n = int(input())

heights = list(map(int, input().split()))

values = dict()

for ii, h in enumerate(heights):
    c1 = ii - h
    if (c1) in values:
        values[c1].append((ii, h))
    else:
        values[c1] = [(ii, h)]

count = 0
for j, h in enumerate(heights):
    if (j + h) in values:
        count += len(values[j + h])
        # for i, ai in values[j + h]:
        #     if i > 0 and i > j and not (j, i) in count:
        #         count[(j, i)] = True


print(count)

Buggy python submission (verdict: Time Limit Exceeded):
# 32:35
n = int(input())

heights = list(map(int, input().split()))

values = dict()

for invI, h in enumerate(heights):
    c1 = invI - h
    if (c1) in values:
        values[c1].append((invI, h))
    else:
        values[c1] = [(invI, h)]
    c2 = -invI - h
    if (c2) in values:
        values[c2].append((-invI, h))
    else:
        values[c2] = [(-invI, h)]

count = dict()
for j, h in enumerate(heights):
    if (j + h) in values:
        for i, ai in values[j + h]:
            if i > 0 and i > j and not (j, i) in count:
                count[(j, i)] = True
    if (h - j) in values:
        for invI, ai in values[h - j]:
            i = -invI
            if invI < 0 and j > i and not (i, j) in count:
                count[(i, j)] = True

print(len(count))

Fixed submission:
# 32:35
n = int(input())

heights = list(map(int, input().split()))

values = dict()

for ii, h in enumerate(heights):
    c1 = ii - h
    if (c1) in values:
        values[c1].append((ii, h))
    else:
        values[c1] = [(ii, h)]

count = 0
for j, h in enumerate(heights):
    if (j + h) in values:
        count += len(values[j + h])
        # for i, ai in values[j + h]:
        #     if i > 0 and i > j and not (j, i) in count:
        #         count[(j, i)] = True


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

print(min(b-1, n))a,b,n = map(int, input().split())

print(min(b-1, n))

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

m = min(b-1, n)

print(a * m // b)
Buggy python submission (verdict: Time Limit Exceeded):
k=int(input())
if not k&1:
    print(-1)
    exit()
ks=str(k)
carry=0
d1=int(ks[-1])
i=1
while i<=10**8:
    flag=False
    car=int(carry)
    for j in range(0,10):
        if (d1*j+car)%10==7:
            carry=str((car+k*j)//10)
            if len(carry)==carry.count('7'):
                print(i+len(carry))
                exit()
            flag=True
            break
    if not flag:
        print(-1)
        exit()
    i+=1

Fixed submission:
k=int(input())
mod=7
cnt=1
for i in range(k):
    if mod%k==0:
        print(cnt)
        exit()
    mod=(mod*10+7)%k
    cnt+=1
print(-1)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque
k=int(input())
if not k&1:
    print(-1)
    exit()
ks=str(k)
tmp=-1
carries=deque()
carries.append(0)
d1=int(ks[-1])

mul=0
i=1
while i<10**7:
    flag=False
    car=carries.pop()
    for j in range(0,10):
        if (d1*j+car)%10==7:
            cr=(car+k*j)//10
            if len(str(cr))==str(cr).count('7'):
                print(i+len(str(cr)))
                exit()
            carries.append(cr)
            flag=True
            break
    if not flag:
        print(-1)
        exit()
    i+=1

Fixed submission:
k=int(input())
mod=7
cnt=1
for i in range(k):
    if mod%k==0:
        print(cnt)
        exit()
    mod=(mod*10+7)%k
    cnt+=1
print(-1)
Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
a=list(map(int,input().split()))
mula_prev=0
mula_now=0
tmp=1
for i in range(k):tmp*=a[i]
mula_prev=tmp
for i in range(k,n):
    mula_now=tmp*a[i]//a[i-k]
    if mula_now>mula_prev:
        print('Yes')
    else:
        print('No')
    mula_now=mula_prev
    

Fixed submission:
n,k=map(int,input().split())
a=list(map(int,input().split()))
mula_now=0
tmp=0
mula_prev=a[0]
for i in range(k,n):
    mula_now=a[i]
    if mula_now>mula_prev:
        print('Yes')
    else:
        print('No')
    tmp+=1
    mula_prev=a[tmp]
Buggy python submission (verdict: Runtime Error):
S=lambda:input()
I=lambda:int(input())
L=lambda:list(map(int,input().split()))
LS=lambda:list(map(str,input().split()))

def main():
    from sympy import sieve
    import sys
    import math
    import copy
    input=sys.stdin.readline
    n=I()
    a=L()
    
    primelist=[i for i in sieve.primerange(1,int(math.sqrt(1e+6))+1)]
    
    dic={}
    for i in range(n):
        for j in primelist:
            if a[i]%j==0:
                if j in dic:
                    dic[j].add(a[i])
                else:
                    dic[j]={a[i]}
    ans=0
    a=list(set(a))
    keyset=set([i for i in dic.keys()])
    if len(a)==1:
        print(0)
        exit()
    for i in range(len(a)):
        tmpset=copy.copy(keyset)
        seta=set(a)
        tmp=[]
        for j in primelist:
            if a[i]%j==0:tmp.append(j)
        tmpset=tmpset - set(tmp)
        for j in tmpset:
            seta=seta-dic[j]
        ans+=1 if(min(seta)==a[i]) else 0 
    print(ans)
    
if __name__ == '__main__':
    main()


Fixed submission:
def main():
    import sys
    input=sys.stdin.readline
    n=int(input())
    a=list(map(int,input().split()))
    adic={}
    for i in range(n):
        if a[i] in adic:
            adic[a[i]]+=1
        else:
            adic[a[i]]=1
    ans=0
    a=list(set(a))
    a.sort()
    maxa=max(a)
    dp=[True for i in range(maxa+1)]
    for i in a:
        if dp[i] and adic[i]==1:ans+=1
        j=i+i
        while j<=maxa:
            dp[j]=False
            j+=i
    print(ans)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
def main():
    n,k=map(int,input().split())
    a=[0]*n
    for i in range(k):
        d=int(input())
        tmp=input()
        for j in range(d):
            a[int(tmp[j*2])-1]+=1
    ans=0
    for i in range(n):
        if a[i]==0:
            ans+=1
    print(ans)

if __name__ =='__main__':
    main()

Fixed submission:
def main():
    n,k=map(int,input().split())
    a=[0]*n
    for i in range(k):
        d=int(input())
        if d==1:
            a[int(input())-1]+=1
        else:
            tmp=list(map(int,input().split()))
            for j in tmp:
                a[j-1]+=1
    ans=0
    for i in range(n):
        if a[i]==0:
            ans+=1
    print(ans)

if __name__ =='__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n=int(input())
    s=input()
    r=[]
    g=[]
    b=[]
    ans=0
    for i in range(n):
        if s[i]=='R':
            r.append(i)
        if s[i]=='G':
            g.append(i)
        if s[i]=='B':
            b.append(i)
    for i in r:
        for j in g:
            for k in b:
                if k+i!=2*j and i+j!=2*k and j+k!=2*i:
                    ans+=1
    print(ans)
    
if __name__ == '__main__':
    main()

Fixed submission:
def main():
    n=int(input())
    s=input()
    r=[]
    g=[]
    b=[]
    rdict={}
    gdict={}
    bdict={}
    ans=0
    for i in range(n):
        if s[i]=='R':
            r.append(i)
            rdict[2*i]=2*i
        if s[i]=='G':
            g.append(i)
            gdict[2*i]=2*i
        if s[i]=='B':
            b.append(i)
            bdict[2*i]=2*i
    ans=len(r)*len(g)*len(b)
    for i in r:
        for j in g:
            if i+j in bdict:
                ans-=1
    for i in g:
        for j in b:
            if i+j in rdict:
                ans-=1
    for i in b:
        for j in r:
            if i+j in gdict:
                ans-=1
    print(ans)
    
if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
s=input()

n=len(s)
h=(n-1)//2
hh=h//2
h3=(n+3)//2
h3h=(h3+n)//2

s1=s[:h]
s2=s[h+1:]
s3=s[:hh]
s4=s[hh+1:h]
s5=s[h3-1:h3h-1]
s6=s[h3h:]

f1=f2=f3=True
for i in range(len(s1)):
  if s1[i]!=s2[len(s2)-1-i]:
    f1=False
for i in range(len(s3)):
  if s3[i]!=s4[len(s4)-1-i]:
    f2=False
for i in range(len(s5)):
  if s5[i]!=s6[len(s6)-1-i]:
    f3=False

ans='Yes' if f1==f2==f3==True else 'No'
print(ans)

Fixed submission:
def main():
    I=lambda:input()
    s=I()
    if s!=s[::-1]:
        print('No')
        exit()
    s1=s[:(len(s)-1//2)+1]
    if s1!=s1[::-1]:
        print('No')
        exit()
    s2=s[(len(s)+3)//2-1:]
    if s2!=s2[::-1]:
        print('No')
        exit()
    print('Yes')
    
if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
s=input().replace('\n','')
q=int(input())
num1=0
for i in range(q):
    query=input()
    if query[0]=='1':
        num1+=1
    else:
        query=query.replace('\n','')
        _,f,c=map(str,query.split())
        if f=='1':
            if num1%2==0:
                s=c+s
            else:
                s=s+c[::-1]
        else:
            if num1%2==0:
                s=s+c
            else:
                s=c[::-1]+s
if num1%2==0:
    print(s)
else:
    print(s[::-1])


Fixed submission:
import sys
input = sys.stdin.readline
s=input().replace('\n','')
q=int(input())
num1=0
sento=''
matsubi=''

for i in range(q):
    query=input()
    if query[0]=='1':
        num1+=1
    else:
        query=query.replace('\n','')
        _,f,c=map(str,query.split())
        if f=='1':
            if num1%2==0:
                sento=c+sento
            else:
                matsubi+=c
        else:
            if num1%2==0:
                matsubi+=c
            else:
                sento=c+sento
ans=sento+s+matsubi
if num1%2==0:
    print(ans)
else:
    print(ans[::-1])

Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
s=input().replace('\n','')
q=int(input())
for i in range(q):
    query=input()
    if int(query[0])==1:
        s=s[::-1]
    else:
        query=query.replace('\n','')
        _,f,c=map(str,query.split())
        if int(f)==1:
            s=c+s
        else:
            s=s+c
print(s)


Fixed submission:
import sys
input = sys.stdin.readline
s=input().replace('\n','')
q=int(input())
num1=0
sento=''
matsubi=''

for i in range(q):
    query=input()
    if query[0]=='1':
        num1+=1
    else:
        query=query.replace('\n','')
        _,f,c=map(str,query.split())
        if f=='1':
            if num1%2==0:
                sento=c+sento
            else:
                matsubi+=c
        else:
            if num1%2==0:
                matsubi+=c
            else:
                sento=c+sento
ans=sento+s+matsubi
if num1%2==0:
    print(ans)
else:
    print(ans[::-1])
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
num=[0 for i in range(n)]
flag=[False for i in range(n)]
s=[]
c=[]
for i in range(m):
    si,ci=map(int,input().split())
    s.append(si)
    c.append(ci)

def ans():
    for i in range(m):
        if s[i]-1==0 and c[i]==0:
            continue
        if !flag[s[i]-1]:
            num[s[i]-1]=c[i]
            flag=True
        else:
            num[s[i]-1]=min(c[i],num[s[i]-1])
    if n!=1 and num[0]==0:
        print(-1)
        return
    for i in range(n):
        print(num[i],end="")
    print()

ans()

Fixed submission:
def main():
    I=lambda:input()
    L=lambda:list(map(int,input().split()))
    n,m=L()
    sc=[]
    for i in range(m):
        si,ci=L()
        sc.append([si,ci])
    mini=0 if n==1 else 10**(n-1)
    for i in range(mini,10**n):
        tmp=str(i)
        flag=True
        for j in range(m):
            if tmp[sc[j][0]-1]!=str(sc[j][1]):
                flag=False
        if flag:
            print(i)
            exit()
    print(-1)
        
    
    
if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
from collections import defaultdict
import sys

def main():
    input = sys.stdin.readline
    n=int(input())
    dic=defaultdict(int)
    for i in range(n):
        dic[input().strip('\n')]+=1
    max_kv_list=[k for k,v in dic.items() if v==max(dic.values())]
    max_kv_list.sort()
    [print(i) for i in max_kv_list]
    

if __name__ == '__main__':
    main()


Fixed submission:
from collections import defaultdict
import sys

def main():
    input = sys.stdin.readline
    n=int(input())
    dic=defaultdict(int)
    st=set([])
    for i in range(n):
        s=input().strip('\n')
        st.add(s)
        dic[s]+=1
    maxv=max(dic.values())
    l=sorted(st)
    for i in range(len(l)):
        if dic[l[i]]==maxv:
            print(l[i])
        
    

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
from collections import defaultdict
import sys

def main():
    input = sys.stdin.readline
    n=int(input())
    dic=defaultdict(int)
    for i in range(n):
        dic[input().strip('\n')]+=1
    max_kv_list=[k for k,v in dic.items() if v==max(dic.values())]
    max_kv_list.sort()
    for i in range(len(max_kv_list)):
        print(max_kv_list[i])

if __name__ == '__main__':
    main()


Fixed submission:
from collections import defaultdict
import sys

def main():
    input = sys.stdin.readline
    n=int(input())
    dic=defaultdict(int)
    st=set([])
    for i in range(n):
        s=input().strip('\n')
        st.add(s)
        dic[s]+=1
    maxv=max(dic.values())
    l=sorted(st)
    for i in range(len(l)):
        if dic[l[i]]==maxv:
            print(l[i])
        
    

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
from collections import defaultdict
n=int(input())
dic=defaultdict(int)
for i in range(n):
    dic[input()]+=1
max_kv_list=[k for k,v in dic.items() if v==max(dic.values())]
max_kv_list.sort()
for i in range(len(max_kv_list)):
    print(max_kv_list[i])


Fixed submission:
from collections import defaultdict
import sys

def main():
    input = sys.stdin.readline
    n=int(input())
    dic=defaultdict(int)
    st=set([])
    for i in range(n):
        s=input().strip('\n')
        st.add(s)
        dic[s]+=1
    maxv=max(dic.values())
    l=sorted(st)
    for i in range(len(l)):
        if dic[l[i]]==maxv:
            print(l[i])
        
    

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
p=list(map(int,input().split()))
for i in range(n):
    p[i]=(p[i]+1)/2
ans=0.0
for i in range(n-k+1):
    if(ans<sum(p[i:i+k])):
        ans=sum(p[i:i+k])
print(ans)

Fixed submission:
n,k=map(int,input().split())
p=list(map(int,input().split()))
pp=[]
su=0
for i in range(n):#累積和
    if i<k:
        su+=p[i]
    else:
        pp.append(su)
        su=su-p[i-k]+p[i]
pp.append(su)
ans=0.0
for i in range(len(pp)):
    j=(pp[i]+k)/2
    if ans<j:
        ans=j
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    import sys
    input=sys.stdin.readline
    h,n=map(int,input().split())
    a=[]
    b=[]
    for i in range(n):
        ai,bi=map(int,input().split())
        a.append(ai)
        b.append(bi)
    inf=max(b)*h
    
    #dp[i]=体力をi減らすために消耗する魔力の最小値
    dp=[inf]*(h+max(a))
    dp[0]=0
    for i in range(h):
        for j in range(n):
            dp[i+a[j]]=min(dp[i+a[j]],dp[i]+b[j])
    print(min(dp[h:]))
    
if __name__ == '__main__':
    main()

Fixed submission:
def main():
    import sys
    input=sys.stdin.readline
    h,n=map(int,input().split())
    a=[]
    b=[]
    for i in range(n):
        ai,bi=map(int,input().split())
        a.append(ai)
        b.append(bi)
    inf=max(b)*h
    
    #dp[i]=体力をi減らすために消耗する魔力の最小値
    dp=[inf]*(h+max(a))
    dp[0]=0
    for i in range(h):
        for j in range(n):
            dp[i+a[j]]=min(dp[i+a[j]],dp[i]+b[j])
    print(min(dp[h:]))
    
if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
a,b,x=map(int,input().split())
def an():
    if x>a*1e+9+b*10:
        print(int(1e+9))
        return
    i=int(1e+9)
    j=i
    max=int(1e+9)
    min=1
    while max-min>1:
        d=len(str(i))
        if a*i+b*d>x:
            max=i
        else:
            min=(i+j)//2
        i=(max+min)/2
    print(min)
an()

Fixed submission:
s = input()
if s=='SUN':
  print(7)
elif s=='MON':
  print(6)
elif s=='TUE':
  print(5)
elif s=='WED':
  print(4)
elif s=='THU':
  print(3)
elif s=='FRI':
  print(2)
elif s=='SAT':
  print(1)

Buggy python submission (verdict: Runtime Error):
a,b,x=map(int,input().split())
def an():
    if x>a*1e+9+b*10:
        print(int(1e+9))
        return
    i=int(1e+9)
    j=i
    cou=0
    while True:
        cou+=1
        if(cou>10000):break#整数除算で限界が来た時用
        d=len(str(i))
        if a*i+b*d>x:
            j=i
            i//=2
        elif a*i+b*d<x:
            i=(i+j)//2
        else:
            return
    for k in range(min(i,j),max(i,j)+1):
        d=len(str(k))
        if a*k+b*d==x:
            print(k)
            return
        if a*k+b*d>x:
            print(k-1)
            return
an()

Fixed submission:
s = input()
if s=='SUN':
  print(7)
elif s=='MON':
  print(6)
elif s=='TUE':
  print(5)
elif s=='WED':
  print(4)
elif s=='THU':
  print(3)
elif s=='FRI':
  print(2)
elif s=='SAT':
  print(1)

Buggy python submission (verdict: Runtime Error):
s = input()
if s=='SUN':
  print(7)
elif s='MON':
  print(6)
elif s=='TUE':
  print(5)
elif s=='WED':
  print(4)
elif s=='THU':
  print(3)
elif s=='FRI':
  print(2)
elif s=='SAT':
  print(1)

Fixed submission:
s = input()
if s=='SUN':
  print(7)
elif s=='MON':
  print(6)
elif s=='TUE':
  print(5)
elif s=='WED':
  print(4)
elif s=='THU':
  print(3)
elif s=='FRI':
  print(2)
elif s=='SAT':
  print(1)

Buggy python submission (verdict: Runtime Error):
s = input()
if s='SUN':
  print(7)
elif s='MON':
  print(6)
elif s='TUE':
  print(5)
elif s='WED':
  print(4)
elif s='THU':
  print(3)
elif s='FRI':
  print(2)
elif s='SAT':
  print(1)

Fixed submission:
s = input()
if s=='SUN':
  print(7)
elif s=='MON':
  print(6)
elif s=='TUE':
  print(5)
elif s=='WED':
  print(4)
elif s=='THU':
  print(3)
elif s=='FRI':
  print(2)
elif s=='SAT':
  print(1)
Buggy python submission (verdict: Runtime Error):

a,b = map(int, input().split())
ans=a*b
if:a>=10 or b >=10:
    print(-1)
else:
    print(ans)

Fixed submission:
a,b = map(int, input().split())
ans=a*b
if a>=10 or b >=10:
    print(-1)
else:
    print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
n,k,q=map(int,input().split())
a=[]
score=np.array([k]*n)
for i in range(q):
    score-=1
    score[int(input())-1]+=1
for i in range(n):
    print('Yes' if score[i]>0 else 'No')

Fixed submission:
import numpy as np
n,k,q=map(int,input().split())
score=np.array([k-q]*n)
for i in range(q):
    score[int(input())-1]+=1
for i in range(n):
    print('Yes' if score[i]>0 else 'No')
Buggy python submission (verdict: Time Limit Exceeded):
n,m=map(int,input().split())
a=list(map(int,input().split()))
for i in range(m):
    a.sort(reverse=True)
    a[0]=a[0]//2
print(sum(a))


Fixed submission:
import heapq
def _heappush_max(heap,item):
  heap.append(item)
  heapq._siftdown_max(heap,0,len(heap)-1)
def _heappop_max(heap):
  lastelt=heap.pop()
  if heap:
    returnitem=heap[0]
    heap[0]=lastelt
    heapq._siftup_max(heap,0)
    return returnitem
  return lastelt

n,m=map(int,input().split())
a=list(map(int,input().split()))
heapq._heapify_max(a)
for i in range(m):
    _heappush_max(a,_heappop_max(a)//2)
print(sum(a))