Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3
import sys


def solve(K: int, S: int):
    cnt = 0
    for x in range(K+1):
        for y in range(K+1):
            for z in range(K+1):
                if x + y + z == S:
                    cnt += 1
    print(cnt)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    K = int(next(tokens))  # type: int
    S = int(next(tokens))  # type: int
    solve(K, S)

if __name__ == '__main__':
    main()


Fixed submission:
#!/usr/bin/env python3
import sys


def solve(K: int, S: int):
    cnt = 0
    for x in range(K+1):
        for y in range(K+1):
            z = S - x - y
            if z >= 0 and z <= K:
                cnt += 1
    print(cnt)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    K = int(next(tokens))  # type: int
    S = int(next(tokens))  # type: int
    solve(K, S)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
def get_point(machine_hand, R, S, P):
    """ 筐体がmachine_handを出した場合，勝った時に得られるポイント
    """
    if machine_hand == 'r':
        return P
    elif machine_hand == 's':
        return R
    elif machine_hand == 'p':
        return S



def main():
    N, K = list(map(int, input().split()))
    R, S, P = list(map(int, input().split()))
    T = input()

    points = []
    used_trials = []
    for i in range(0, len(T)):
        if i < K:
            points.append(get_point(T[i], R, S, P))            
            used_trials.append(i)
        else:
            if T[i] == T[i - K] and i - K in used_trials:
                points.append(0)
            else:
                points.append(get_point(T[i], R, S, P))
                used_trials.append(i)
        
    print(sum(points))


if __name__ == "__main__":
    main()


Fixed submission:
def get_point(machine_hand, R, S, P):
    """ 筐体がmachine_handを出した場合，勝った時に得られるポイント
    """
    if machine_hand == 'r':
        return P
    elif machine_hand == 's':
        return R
    elif machine_hand == 'p':
        return S



def main():
    N, K = list(map(int, input().split()))
    R, S, P = list(map(int, input().split()))
    T = input()

    points = 0
    used_trials = set()
    for i in range(0, len(T)):
        if i < K:
            
            points += get_point(T[i], R, S, P)
            used_trials.add(i)
        else:
            if T[i] == T[i - K] and i - K in used_trials:
                continue
            else:
                # points.append(get_point(T[i], R, S, P))
                points += get_point(T[i], R, S, P)
                used_trials.add(i)
        
    print(points)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
array=list(map(int,input().split()))
ans=array[0]
for i in range(1,n):
    ans*=array[i]
if ans>10**18:
    ans=-1
print(ans)

Fixed submission:
n=int(input())
array=list(map(int,input().split()))
ans=array[0]
for i in range(1,n):
    ans*=array[i]
    if ans>10**18:
        ans=-1
        break
if 0 in array:
    ans=0
print(ans)
Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
d=[0]*n
a=[]
for i in range(k):
    d[i]=int(input())
    a.extend(list(map(int,input().split())))
a=set(a)
print(n-len(a))

Fixed submission:
n,k=map(int,input().split())
d=[0]*k
a=[]
for i in range(k):
    d[i]=int(input())
    a.extend(list(map(int,input().split())))
a=set(a)
print(n-len(a))
Buggy python submission (verdict: Runtime Error):
N, M = map(int,input().split())
H = list(map(int,input().split()))
AB = [0]*M
for i in range(M):
    AB[i] = list(map(int,input().split()))

GD = [0]*N

for A ,B in AB:
    HA = H[A-1]
    HB = H[B-1]
    if HA < HB:
        GD[A-1] -= 1
    elif HA > HB:
        GD[B-1] -= 1
    else:
        GD[A-1] -= 1
        GD[B-1] -= 1

ans = 0
for i in GD:
    if i == 0:
        ans += 1
print(ans)

Fixed submission:
import collections
X = int(input())

for i in range(1000):
    for j in range(-1000,1000):
        if i**5 - j**5 == X:
            print(i,j)
            exit()

Buggy python submission (verdict: Runtime Error):
N, M = map(int,input().split())
H = list(map(int,input().split()))
AB = [0]*M
for i in range(M):
    AB[i] = list(map(int,input().split()))

GD = [0]*N

for A ,B in AB:
    HA = H[A-1]
    HB = H[B-1]
    if HA < HB:
        GD[A-1] -= 1
    elif HA > HB:
        GD[B-1] -= 1
    else:
        GD[A-1] -= 1
        GD[B-1] -= 1

ans = 0
for i in GD:
    if i == 0:
        ans += 1
print(ans)

Fixed submission:
import collections
X = int(input())

for i in range(1000):
    for j in range(-1000,1000):
        if i**5 - j**5 == X:
            print(i,j)
            exit()
Buggy python submission (verdict: Time Limit Exceeded):
x=int(input())
n=100
count=0
while n<x:
    x*=1.01
    count+=1
print(count)

Fixed submission:
x=int(input())
n=100
count=0
while n<x:
    n+=int(n*0.01)
    count+=1
print(count)
Buggy python submission (verdict: Runtime Error):
n=input()
s=[0]*n
for i in range(n):
    s[i]=input()
se=set(s)
print(len(se))

Fixed submission:
n=int(input())
s=[0]*n
for i in range(n):
    s[i]=input()
se=set(s)
print(len(se))
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())
p=list(map(int,input().split()))
a=[0]*n
for i in range(n-1):
    a[p[i]-1]+=1
for i in range(0,n):
    print(a[i])
Buggy python submission (verdict: Time Limit Exceeded):
n,k,c=map(int, input().split())
s=input()
L=[0]*k
R=[0]*k
m=0
l=0
for i in range(k):
    while s[m]=="x":
        m+=1
    L[i]=m
    m+=c+1
    while s[n-l-1]=="x":
        l+=1
    R[i]=n-l-1
    l+=c+1
for i in range(k):
    if sorted(R)[i]==L[i]:
        print(L[i]+1)

Fixed submission:
n,k,c=map(int, input().split())
s=input()
L=[0]*k
R=[0]*k
m=0
l=0
for i in range(k):
    while s[m]=="x":
        m+=1
    L[i]=m
    m+=c+1
    while s[n-l-1]=="x":
        l+=1
    R[i]=n-l-1
    l+=c+1
for i in range(k):
    if R[k-i-1]==L[i]:
        print(L[i]+1)

Buggy python submission (verdict: Runtime Error):
n,k,c=map(int, input().split())
s=input()
L=[]
R=[]
m=0
for i in range(k):
    while s[m]=="x":
        m+=1
    if s[m]=="o":
        L.append(m)
        m+=c
    m+=1
m=0
for i in range(k):
    while s[m]=="x":
        m+=1
    if s[n-m-1]=="o":
        R.insert(0,n-m-1)
        m+=c
    m+=1
for i in range(k):
    if R[i]==L[i]:
        print(R[i]+1)

Fixed submission:
n,k,c=map(int, input().split())
s=input()
L=[0]*k
R=[0]*k
m=0
l=0
for i in range(k):
    while s[m]=="x":
        m+=1
    L[i]=m
    m+=c+1
    while s[n-l-1]=="x":
        l+=1
    R[i]=n-l-1
    l+=c+1
for i in range(k):
    if R[k-i-1]==L[i]:
        print(L[i]+1)

Buggy python submission (verdict: Runtime Error):
n,k,c=map(int, input().split())
s=input()
L=[]
R=[]
m=0
for i in range(k):
    while s[m]=="x":
        m+=1
    if s[m]=="o":
        L.append(m)
        m+=c
    m+=1
m=0
for i in range(k):
    while s[m]=="x":
        m+=1
    if s[n-m-1]=="o":
        R.append(n-m-1)
        m+=c
    m+=1
for i in range(k):
    if R[i]==L[i]:
        print(R[i]+1)

Fixed submission:
n,k,c=map(int, input().split())
s=input()
L=[0]*k
R=[0]*k
m=0
l=0
for i in range(k):
    while s[m]=="x":
        m+=1
    L[i]=m
    m+=c+1
    while s[n-l-1]=="x":
        l+=1
    R[i]=n-l-1
    l+=c+1
for i in range(k):
    if R[k-i-1]==L[i]:
        print(L[i]+1)
Buggy python submission (verdict: Time Limit Exceeded):
N, X, Y = map(int, input().split())
minus = []
plus = []
for A in range(1,N):
    for B in range(A+1,N+1):
        if B - A > abs(X -A) + abs(Y - B) + 1:
            minus.append(B-A)
            plus.append(abs(X -A) + abs(Y - B) + 1)
for k in range(1,N):
    print(N - k - minus.count(k) + plus.count(k))

Fixed submission:
N, X, Y = map(int, input().split())
ks = [0]*(N-1)
for A in range(1,N):
    for B in range(A+1,N+1):
        if B - A > abs(X -A) + abs(Y - B) + 1:
            ks[B-A-1] -= 1
            ks[abs(X -A) + abs(Y - B)] += 1
for k in range(1,N):
    print(N - k + ks[k-1])
Buggy python submission (verdict: Runtime Error):
h = input()
w = input()
n = input()
if h < w:
    h = w
print(int(n / h))

Fixed submission:
import math
h = int(input())
w = int(input())
n = int(input())
if h < w:
    h = w
print(math.ceil(n / h))

Buggy python submission (verdict: Runtime Error):
h = input()
w = input()
n = input()
if h < w:
    h = w
print(int(n / h)

Fixed submission:
import math
h = int(input())
w = int(input())
n = int(input())
if h < w:
    h = w
print(math.ceil(n / h))
Buggy python submission (verdict: Time Limit Exceeded):
n,wmax=map(int,input().split())
v=[0]*n
w=[0]*n
for i in range(n):
    w[i],v[i]=list(map(int,input().split()))
sv=sum(v)+1
dp=[[float('inf')]*sv for _ in range(n)]
dp[0][v[0]-1]=w[0]
for i in range(n):
    dp[i][0]=0
for i in range(n):
    for j in range(sv):
        dp[i][j]=min(dp[i-1][j],dp[i-1][j-v[i]]+w[i])
        if dp[i][j]>wmax:
            dp[i][j]=float('inf')
ans=float('inf')
for p in range(sv-1,-1,-1):
    if dp[n-1][p]!=ans:
        ans=p
        break
print(ans)

Fixed submission:
n,wmax=map(int,input().split())
v=[0]*n
w=[0]*n
for i in range(n):
    w[i],v[i]=list(map(int,input().split()))
sv=sum(v)+1
dp=[[float('inf')]*sv for _ in range(n)]
dp[0][v[0]-1]=w[0]
for i in range(n):
    dp[i][0]=0
for i in range(n):
    for j in range(sv):
        dp[i][j]=min(dp[i-1][j],dp[i-1][j-v[i]]+w[i])
ans=float('inf')
for p in range(sv-1,-1,-1):
    if dp[n-1][p]!=ans and dp[n-1][p]<=wmax:
        ans=p
        break
print(ans)

Buggy python submission (verdict: Runtime Error):
n,maxw=map(int,input().split())
nap=[0]*n
for i in range(n):
    nap[i]=list(map(int,input().split()))
dp=[[0]*(maxw+1) for _ in range(n)]
for i in range(n):
    for j in range(maxw+1):
        if nap[i][0]>j:
            dp[i][j]=dp[i-1][j]
        else:
            dp[i][j]=max(dp[i-1][j],dp[i-1][j-nap[i][0]]+nap[i][1])
print(dp[n-1][maxw])

Fixed submission:
n,wmax=map(int,input().split())
v=[0]*n
w=[0]*n
for i in range(n):
    w[i],v[i]=list(map(int,input().split()))
sv=sum(v)+1
dp=[[float('inf')]*sv for _ in range(n)]
dp[0][v[0]-1]=w[0]
for i in range(n):
    dp[i][0]=0
for i in range(n):
    for j in range(sv):
        dp[i][j]=min(dp[i-1][j],dp[i-1][j-v[i]]+w[i])
ans=float('inf')
for p in range(sv-1,-1,-1):
    if dp[n-1][p]!=ans and dp[n-1][p]<=wmax:
        ans=p
        break
print(ans)

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

Fixed submission:
n,wmax=map(int,input().split())
v=[0]*n
w=[0]*n
for i in range(n):
    w[i],v[i]=list(map(int,input().split()))
sv=sum(v)+1
dp=[[float('inf')]*sv for _ in range(n)]
dp[0][v[0]-1]=w[0]
for i in range(n):
    dp[i][0]=0
for i in range(n):
    for j in range(sv):
        dp[i][j]=min(dp[i-1][j],dp[i-1][j-v[i]]+w[i])
ans=float('inf')
for p in range(sv-1,-1,-1):
    if dp[n-1][p]!=ans and dp[n-1][p]<=wmax:
        ans=p
        break
print(ans)
Buggy python submission (verdict: Runtime Error):
s=input()
ans=0
for i in range(1 << len(s)-1):
    l=[]
    for j in range(len(s)-1):
        if (i>>j)&1==1:
            l.append(s[j])
            l.append("+")
        else:
            l.append(s[j])
    l.append(s[len(s)-1])
    sum+=eval(''.join(l))
print(sum)

Fixed submission:
s=input()
ans=0
for i in range(1 << len(s)-1):
    l=[]
    for j in range(len(s)-1):
        if (i>>j)&1==1:
            l.append(s[j])
            l.append("+")
        else:
            l.append(s[j])
    l.append(s[len(s)-1])
    ans+=eval(''.join(l))
print(ans)

Buggy python submission (verdict: Runtime Error):
s=input()
ans=0
for i in range(1 << len(s)-1):
    l=[]
    for j in range(len(s)-1):
        if (i>>j)&1==1:
            l.append(s[j])
            l.append("+")
        else:
            l.append(S[j])
    l.append(s[len(s)-1])
    sum+=eval(''.join(l))
print(sum)

Fixed submission:
s=input()
ans=0
for i in range(1 << len(s)-1):
    l=[]
    for j in range(len(s)-1):
        if (i>>j)&1==1:
            l.append(s[j])
            l.append("+")
        else:
            l.append(s[j])
    l.append(s[len(s)-1])
    ans+=eval(''.join(l))
print(ans)
Buggy python submission (verdict: Runtime Error):
A, B = list(map(float, input().split()))
#print(A*B)
print(A*(B*100)+0.005)//100

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

a = int(A)
b = int(B[0])
b2 = int(B[2:4])
#print(b)
#print(b2)
#print(b)


t = a*b
#print(t)
#b3 = b*100
bb = a*b2
tmp = bb//100
#print(tmp)
#print(a*b)
bef = tmp+t
ans = str(bef)

print(ans)

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

print(int(int(A)*B+0.5)))


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

a = int(A)
b = int(B[0])
b2 = int(B[2:4])
#print(b)
#print(b2)
#print(b)


t = a*b
#print(t)
#b3 = b*100
bb = a*b2
tmp = bb//100
#print(tmp)
#print(a*b)
bef = tmp+t
ans = str(bef)

print(ans)
Buggy python submission (verdict: Runtime Error):
N, M = list(map(int, input().split()))
H = list(map(int, input().split()))
ans = 0
arr = []
arr2 = []
cnt = 0
for i in range(M):
    a, b = list(map(int, input().split()))
    if a not in arr2:
        arr2.append(a)
    if b not in arr2:
        arr2.append(b)
    if H[a-1] < H[b-1]:
        if H[a] not in arr:
            arr.append(H[a])
            cnt += 1

not_found = len(H)-len(arr2)
print(N-cnt-not_found)


Fixed submission:
from collections import defaultdict
N, M = list(map(int, input().split()))
H = list(map(int, input().split()))
ans = N
tog = defaultdict(list)
arr = set()
cnt = 0

for i in range(M):
    a, b = list(map(int, input().split()))
    tog[a].append(H[b-1])
    tog[b].append(H[a-1])
    '''
    if str(a) not in arr:
        ans -= 1
        arr.add(str(H[a-1]))
    if str(b) not in arr:
        ans -= 1
        arr.add(str(H[b-1]))
    '''
#print(tog)

for ele in tog:
    #print(tog[ele])
    #print(max(tog[ele]))
    if H[ele-1] > max(tog[ele]):
        #print('ok')
        cnt += 1

#print(len(tog))
t = N - len(tog)
#print(t)
#print(len(arr))
#print(len(tog)+N-cnt)
print(cnt+t)
Buggy python submission (verdict: Runtime Error):
X = int(input())

for A in range(100):
    for B in range(-50, 50):
        if A**5-B**5 == X:
            print(A, B)
			exit()

Fixed submission:
X = int(input())

for A in range(1000):
    for B in range(-500, 500):
        if A**5-B**5 == X:
            print(A, B)
            exit()
Buggy python submission (verdict: Runtime Error):
N = int(input())
set = {}
for i in range(N):
    A = str(input())
    set.add(A)

print(len(set))


Fixed submission:
N = int(input())
list = {}
for i in range(N):
    A = str(input())
    list[A] = 1

print(len(list))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
arr = []
for i in range(N):
    A = str(input())
    if A in arr:
        continue
    else:
        arr.append(str(A))

print(len(arr))

Fixed submission:
N = int(input())
list = {}
for i in range(N):
    A = str(input())
    list[A] = 1

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

if N < sum(A):
    print(-1)
else:
    print(N-sum(A))

Fixed submission:
import math
R = int(input())

print(2*math.pi*R)
Buggy python submission (verdict: Time Limit Exceeded):
K = int(input())
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)
ans = 0
for i in range(1, K+1):
    for j in range(1, K+1):
        for k in range(1, K+1):
            ans += gcd(i, j , k)

print(ans)

Fixed submission:
K = int(input())
import math
from functools import reduce

def gcd3(a, b, c):
    return math.gcd(math.gcd(a,b), c)
ans = 0

for i in range(1, K+1):
    for j in range(i+1, K+1):
        for k in range(j+1, K+1):
            ans += gcd3(i, j, k)

ans *= 6

for i in range(1, K+1):
    ans += gcd3(i, i, i)

for i in range(1, K+1):
    for j in range(i+1, K+1):
        ans += gcd3(i, i, j)
        ans += gcd3(i, i, j)
for i in range(1, K+1):
    for j in range(i+1, K+1):
        ans += gcd3(i, j, j)
        ans += gcd3(i, j, j)
for i in range(1, K+1):
    for j in range(i+1, K+1):
        ans += gcd3(i, j, i)
        ans += gcd3(i, j, i)
print(ans)
Buggy python submission (verdict: Runtime Error):
ins = False
ans = [0]*N
ok = True
for i in range(M):
    s, c = list(map(int, input().split()))
    if N != 1 and s==1 and c==0:
        ok = False
    if ans[s-1]==0 or ans[s-1]==c:
        ans[s-1] = c
    else:
        ok = False
    if s == 1:
        ins = True
    else:
        ins = False
answer = []
if ok == True:
    for i in range(len(ans)):
        answer.append(str(ans[i]))
    if N != 1 and ins==False:
        answer[0]='1'
    if N == 1 and M == 0:
        print(0)
    else:
        print(''.join(answer))
else:
    print('-1')


Fixed submission:

#C
N, M = list(map(int, input().split()))
ins = False
ans = [0]*N
ok = True
for i in range(M):
    s, c = list(map(int, input().split()))
    if N != 1 and s==1 and c==0:
        ok = False
    if ans[s-1]==0 or ans[s-1]==c:
        ans[s-1] = c
    else:
        ok = False
    if s == 1:
        ins = True
    else:
        ins = False
answer = []
if ok == True:
    for i in range(len(ans)):
        answer.append(str(ans[i]))
    #if N != 1 and ins==False:
    if N != 1 and answer[0]=='0':
        answer[0]='1'
    if N == 1 and M == 0:
        print(0)
    else:
        print(''.join(answer))
else:
    print('-1')

Buggy python submission (verdict: Runtime Error):
N, M = list(map(int, input().split()))
ins = True
ans = [0]*N
ok = True
for i in range(M):
    s, c = list(map(int, input().split()))
    if s==1 and c==0:
        ok = False
    if ans[s-1]==0 or ans[s-1]==c:
        ans[s-1] = c
    else:
        ok = False
    if s == 1:
        ins = True
    else:
        ins = False
answer = []
if ok == True:
    for i in range(len(ans)):
        answer.append(str(ans[i]))
    if ins==False:
        answer[0]=1
    print(''.join(answer))
else:
    print('-1')


Fixed submission:

#C
N, M = list(map(int, input().split()))
ins = False
ans = [0]*N
ok = True
for i in range(M):
    s, c = list(map(int, input().split()))
    if N != 1 and s==1 and c==0:
        ok = False
    if ans[s-1]==0 or ans[s-1]==c:
        ans[s-1] = c
    else:
        ok = False
    if s == 1:
        ins = True
    else:
        ins = False
answer = []
if ok == True:
    for i in range(len(ans)):
        answer.append(str(ans[i]))
    #if N != 1 and ins==False:
    if N != 1 and answer[0]=='0':
        answer[0]='1'
    if N == 1 and M == 0:
        print(0)
    else:
        print(''.join(answer))
else:
    print('-1')
Buggy python submission (verdict: Runtime Error):
n = int(input())
dict1 = {}

for _ in range(n):
    s = input()
    if s in dict1:
        dict1[s] += 1
    else:
        dict1[s] = 1

dict_sorted = sorted(dict1, key = lambda x: x[0])
dict_sorted.sort(key = lambda x: x[1], reverse = True)

max1 = dict_sorted[0][1]

for i in range(len(dict_sorted)):
    if dict_sorted[i][1] == max1:
        print(dict_sorted[i][0])
    else:
        break


Fixed submission:
n = int(input())
dict1 = {}

for _ in range(n):
    s = input()
    if s in dict1:
        dict1[s] += 1
    else:
        dict1[s] = 1

dict_sorted = sorted(list(dict1.items()), key = lambda x: x[0])
dict_sorted.sort(key = lambda x: x[1], reverse = True)

max1 = dict_sorted[0][1]

for i in range(len(dict_sorted)):
    if dict_sorted[i][1] == max1:
        print(dict_sorted[i][0])
    else:
        break

Buggy python submission (verdict: Runtime Error):
n = int(input())
dict1 = {}

for _ in range(n):
    s = input()
    if s in dict1:
        dict1[s] += 1
    else:
        dict1[s] = 1

dict1.sort(key = lambda x: x[0])
dict1.sort(key = lambda x: x[1], reverse = True)

max1 = dict1[0][1]

for i in range(len(dict1)):
    if dict1[i][1] == max1:
        print(dict1[i][0])
    else:
        break


Fixed submission:
n = int(input())
dict1 = {}

for _ in range(n):
    s = input()
    if s in dict1:
        dict1[s] += 1
    else:
        dict1[s] = 1

dict_sorted = sorted(list(dict1.items()), key = lambda x: x[0])
dict_sorted.sort(key = lambda x: x[1], reverse = True)

max1 = dict_sorted[0][1]

for i in range(len(dict_sorted)):
    if dict_sorted[i][1] == max1:
        print(dict_sorted[i][0])
    else:
        break
Buggy python submission (verdict: Time Limit Exceeded):
N, K = list(map(int, input().split()))
H = list(map(int, input().split()))

cnt = 0

if N <= K:
  print(0)
else:
  for i in range(K):
    H.remove(max(H))

  cnt += sum(H)

  print(cnt)


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

cnt = 0

if N <= K:
  print(0)
else:
  H.sort(reverse=True)
  H = H[K:]

  cnt += sum(H)

  print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
p = list(map(int, input().split()))

cnt = 1
if len(p) >= 2 and p[0] >= p[1]:
  cnt += 1

for i in range(2, N):
  if min(p[:i+1]) == p[i]:
    cnt += 1
  else:
    continue

print(cnt)


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

cnt = 1
mi = p[0]

for i in range(N):
  if mi > p[i]:
    mi = p[i]
    cnt += 1


print(cnt)
Buggy python submission (verdict: Runtime Error):
C = str(input())

alph = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u

for i, j in enumerate(alph):
  if C == j:
    print(alph[i+1])


Fixed submission:
C = str(input())

alph = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']

for i, j in enumerate(alph):
  if C == j:
    print(alph[i+1])

Buggy python submission (verdict: Runtime Error):
C = str(input())

alph = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u

for i, j in enumerate(alph):
  if C == j:
    print(alph[i+1])


Fixed submission:
C = str(input())

alph = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']

for i, j in enumerate(alph):
  if C == j:
    print(alph[i+1])
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = str(input())

cnt = 0

for i in range(0,len(S)):
  if S[i]  == 'A' and  S[i+1] == 'B' and S[i+2] == 'C':
   cnt += 1


print(cnt)


Fixed submission:
N = int(input())
S = str(input())

cnt = 0

for i in range(0,len(S)-2):
  if S[i]  == 'A' and  S[i+1] == 'B' and S[i+2] == 'C':
   cnt += 1


print(cnt)

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

cnt = 0

for i in range(0,len(S):
  if S[i]  == 'A' and  S[i+1] == 'B' and S[i+2] == 'C':
   cnt += 1


print(cnt)


Fixed submission:
N = int(input())
S = str(input())

cnt = 0

for i in range(0,len(S)-2):
  if S[i]  == 'A' and  S[i+1] == 'B' and S[i+2] == 'C':
   cnt += 1


print(cnt)