Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
s = input()

YYMM = False
MMYY = False
month = []
for i in range(1,13):
  if len(str(i))==1:
    month.append("0"+str(i))
  else:
    month.append(str(i))
    
if s[:2] in month:
  MMYY = True
  
if[2:] in month:
  YYMM = True
  
if MMYY is True and YYMM is True:
  print("AMBIGUOUS")
elif MMYY is True and YYMM is False:
  print("MMYY")
elif MMYY is False and YYMM is True:
  print("YYMM")
else:
  print("NA")

Fixed submission:
s = input()

YYMM = False
MMYY = False
month = []
for i in range(1,13):
  if len(str(i))==1:
    month.append("0"+str(i))
  else:
    month.append(str(i))
    
if s[:2] in month:
  MMYY = True
  
if s[2:] in month:
  YYMM = True
  
if MMYY is True and YYMM is True:
  print("AMBIGUOUS")
elif MMYY is True and YYMM is False:
  print("MMYY")
elif MMYY is False and YYMM is True:
  print("YYMM")
else:
  print("NA")
Buggy python submission (verdict: Runtime Error):
a,b,k = map(int,input().split())

ans=[]

for i in range(1,max(a,b)):
  if a%i ==0 and b%i ==0:
    ans.append(i)

    
ans.sort(reverse=True)
print(ans[k-1])

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

ans=[]

for i in range(1,max(a,b)+1):
  if a%i ==0 and b%i ==0:
    ans.append(i)

    
ans.sort(reverse=True)
print(ans[k-1])
Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
x =[]
c = 0
for i in range(n):
  a = list(map(int,input().split()))
  a.pap(0)
  x.extend(a)
  
for j in range(1,m+1):
  if x.count(j) ==n:
    c +=1
    
print(c)

Fixed submission:
n,m = map(int,input().split())
x = []
c = 0
for i in range(n):
    a = list(map(int,input().split()))
    a.pop(0)
    x.extend(a)

for j in range(1,m+1):
    if x.count(j) == n:
        c += 1

print(c)
Buggy python submission (verdict: Runtime Error):
n = int(input())
l = [int(i) for i in input().split()]

l.sort(reverse=True)

max = l[0]
els = sum(l[1:])

if max > else:
  print("Yes")
else:
  print("No")

Fixed submission:
n = int(input())
l = [int(i) for i in input().split()]

l.sort(reverse=True)

max = l[0]
els = sum(l[1:])

if max < els:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
s = input()

ans =[]

for i in range(:len(s)-2):
  ans.append(int(s[i] +s[i+1] +s[i+2]))
  
num =[]

for i in range(len(ans)):
  num.append(abs(754-ans[i]))
               
num.sort()
               
print(num[0]


Fixed submission:
s = input()

ans =[]

for i in range(len(s)-2):
  ans.append(int(s[i] +s[i+1] +s[i+2]))
  
num =[]

for i in range(len(ans)):
  num.append(abs(753-int(ans[i])))
               
num.sort()
               
print(num[0])

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

ans =[]

for i in range(:len(s)-2):
  ans.append(int(s[i] +s[i+1] +s[i+2]))
  
num =[]

for i in range(len(ans):
  num.append(abs(754-ans[i]))
               
num.sort()
               
print(num[0]


Fixed submission:
s = input()

ans =[]

for i in range(len(s)-2):
  ans.append(int(s[i] +s[i+1] +s[i+2]))
  
num =[]

for i in range(len(ans)):
  num.append(abs(753-int(ans[i])))
               
num.sort()
               
print(num[0])

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

ans =[]

for i in range(:len(s)-2):
  ans.append(int(s[i] +s[i+1] +s[i+2]))
  
num =[]

for i in range(len(ans()):
  num.append(abs(754-ans[i]))
               
num.sort()
               
print(num[0]

Fixed submission:
s = input()

ans =[]

for i in range(len(s)-2):
  ans.append(int(s[i] +s[i+1] +s[i+2]))
  
num =[]

for i in range(len(ans)):
  num.append(abs(753-int(ans[i])))
               
num.sort()
               
print(num[0])
Buggy python submission (verdict: Runtime Error):
n = int(input())
t,a = map(int,input().split())
hl = list (map(intinput().split()))

dt = 10**9
num = 0
for i in range(n):
  ti = t = hl[i]*0.006
  if abs(a - ti) <= dt:
    dt = abs(a -ti)
    num = i
    
    
print(num + 1)

Fixed submission:
n = int(input())
t, a = map(int, input().split())
hl = list(map(int, input().split()))

dt = 10**9
num = 0
for i in range(n):
    ti = t - hl[i] * 0.006
    if abs(a - ti) <= dt:
        dt = abs(a - ti)
        num = i

print(num + 1)
Buggy python submission (verdict: Runtime Error):
n,t = map(int,input().split())

ct = [[int(i) for i in input().split()] for _ in range(n)]

x=[]
for i in range(n):
  if ct[i][1] <= t:
    x.append(ct[i][0])
    
    
x.sort()

print(x[0])

if not x:
  print("TLE")



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

ct = [[int(i) for i in input().split()] for _ in range(n)]

x=[]
for i in range(n):
  if ct[i][1] <= t:
    x.append(ct[i][0])
    
    
x.sort()

if len(x) != 0:
  print(x[0])
else:
  print("TLE")

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

ct = [[int(i) for i in input().split()] for _ in range(n)]

x=[]
for i in range(n):
  if ct[i][1] <= t:
    x.append(ct[i][0])
    
    
x.sort()

print(x[0])

if len(x) == 0:
  print("TLE")

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

ct = [[int(i) for i in input().split()] for _ in range(n)]

x=[]
for i in range(n):
  if ct[i][1] <= t:
    x.append(ct[i][0])
    
    
x.sort()

if len(x) != 0:
  print(x[0])
else:
  print("TLE")

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

ct = [[int(i) for i in input().split()] for _ in range(n)]

x=[]
for i in range(n):
  if ct[i][1] <= t:
    x.append(ct[i][0])
    
    
x.sort()

print(x[0])



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

ct = [[int(i) for i in input().split()] for _ in range(n)]

x=[]
for i in range(n):
  if ct[i][1] <= t:
    x.append(ct[i][0])
    
    
x.sort()

if len(x) != 0:
  print(x[0])
else:
  print("TLE")

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

ct = [[int(i) for i in input().split()] for _ in range(n)]

x=[]
for i in range(n):
  if ct[i][1] <= t:
    x.append(ct[i][0])
    
    
x.sotr()

print(x[0])

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

ct = [[int(i) for i in input().split()] for _ in range(n)]

x=[]
for i in range(n):
  if ct[i][1] <= t:
    x.append(ct[i][0])
    
    
x.sort()

if len(x) != 0:
  print(x[0])
else:
  print("TLE")
Buggy python submission (verdict: Runtime Error):
n = input()

x = False

while x = False:
  for i in range(1,len(n)):
    if n[i-1] == n[i]:
      x =True
    else:
      x = False
  if x = True:
    print(n)
    break
  else:
    n = int(n) + 1

Fixed submission:
n=int(input())
for i in range(10):
  if 111*i<n<=111*(i+1):
    print(111*(i+1))
Buggy python submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
v = list(map(int,input().split()))
a = Counter(v[0::2]).most_common()
b = Counter(v[1::2]).most_common()
a.append([0,0])
b.append([0,0])

if a[0][0] != b[0][0]:
  print(n-(a[0][1]+b[0][1]))
else:
  print(min(n-(a[1][1]+b[0][1]),n-(a[0][1]+b[1][1]))
         

Fixed submission:
from collections import Counter
n = int(input())
v = list(map(int,input().split()))
a = Counter(v[0::2]).most_common()
b = Counter(v[1::2]).most_common()
a.append([0,0])
b.append([0,0])

if a[0][0] != b[0][0]:
  print(n-(a[0][1]+b[0][1]))
else:
  print(min(n-(a[1][1]+b[0][1]),n-(a[0][1]+b[1][1])))
Buggy python submission (verdict: Runtime Error):
N,M,X,Y = map(int,input().split())

x = [int(i) for i in input().split()]
y = [int(i) for i in input().split()]

c=0
for i in range(X,Y+1):
  c =0
  if (i >=X and i <=Y) :
    c += 1
  if max(x) < i :
    c + =1
  if min(y) < i :
    c += 1
  
  if c == 3:
    print("No War")
    exit()
  else:
    continue
    
    
print("War")


    



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

x = [int(i) for i in input().split()]
y = [int(i) for i in input().split()]

c=0
for i in range(X+1,Y+1):
  c =0
  if (i >X and i <=Y) :
    c += 1
  if max(x) < i :
    c += 1
  if min(y) >= i :
    c += 1
  
  if c == 3:
   
    print("No War")
    exit()
  else:
    continue
    
    
print("War")
Buggy python submission (verdict: Runtime Error):
N,K = map(int,input().split())
x = [int(i) for i in input().split()]
ans = 10**5
for i in range(N-K+1):
  left =x[i]
  right =x[i+3]
  p1 = abs(left) + abs(right-left)
  p2 = abs(right) + abs(right-left)
  p = min(p1,p2)
  ans = min(ans,p)
  
  
print(ans)
  

Fixed submission:
N,K = map(int,input().split())
x = [int(i) for i in input().split()]
a=[]
for i in range(N-K+1):
  left =x[i]
  right =x[i+K-1]
  p1 = abs(left) + abs(right-left)
  p2 = abs(right) + abs(right-left)
  p = min(p1,p2)
  a.append(p)
  
  
print(min(a))
Buggy python submission (verdict: Runtime Error):
S = input()


ans = 0
num = 0
cnum = 0
if S[0] == "A":
  ans += 1

for i in range(2,len(S)-1):
  if S[i] == "C":
    cnum += 1
    
if cnum == 1:
  ans +=1

for j in range(len(S)):
  if j.islower() == True:
    num += 1

    
if num == len(S)-2:
  ans +=1
  
  
  

if ans ==3:
  print("AC")
else:
  print("WA")

Fixed submission:
S = input()


ans = 0
num = 0
cnum = 0

if S[0] == "A":
  ans += 1

for i in range(2,len(S)-1):
  if S[i] == "C":
    cnum += 1
    
if cnum == 1:
  ans +=1

for j in range(len(S)):
  if S[j].islower() == True:
    num += 1

    
if num == len(S)-2:
  ans +=1
  
  
  

if ans ==3:
  print("AC")
else:
  print("WA")
Buggy python submission (verdict: Runtime Error):
N = int(input())

a = [int(i) for i in input().split()]

i=0

max = 0
min = 0
for i in range(n):
  if a[i] >= max:
    max = a[i]
  elif a[i] <= min:
    min = a[i]
  else
    continue
    
print (max - min)
  


Fixed submission:
n = int(input())


if n % 2:
  print(n*2)
else:
  print(n)
Buggy python submission (verdict: Runtime Error):
N = int(input())

a = [int(i) for i in input().split()]

i=0

max = 0
min = 0
for i in range(n):
  if a[i] >= max:
    max = a[i]
  elif a[i] <= min:
    min = a[i]
  else:
    continue
    
print (max - min)
  

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
dist = []
for i in range(n):
    for j in range(n):
        if i >= j:
            continue
        dist.append(abs(a[i]-a[j]))
print(max(dist))

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

a = [int(i) for i in input().split()]

i=0

max = 0
min = 0
for i in range(n):
  if a[i] >= max:
    max = a[i]
  elif a[i] <= min:
    min = a[i]
  else
    continue
    
print (max - min)
  


Fixed submission:
n = int(input())
a = list(map(int, input().split()))
dist = []
for i in range(n):
    for j in range(n):
        if i >= j:
            continue
        dist.append(abs(a[i]-a[j]))
print(max(dist))

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

a = [int(i) for i in input().split()]

i=0

c=0
max = 0
min = 0
for i in range(n):
  if a[i] >= max:
    max = a[i]
  elif a[i] <= min:
    min = a[i]
  else
    i +=1
    
print (max - min)
  


Fixed submission:
n = int(input())
a = list(map(int, input().split()))
dist = []
for i in range(n):
    for j in range(n):
        if i >= j:
            continue
        dist.append(abs(a[i]-a[j]))
print(max(dist))

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

a = [int(i) for i in input().split()]

i=0

c=0
max = 0
min = 0
for i in a[i]:
  if a[i] >= max:
    max = a[i]
  elif a[i] <= min:
    min = a[i]
  else
    i +=1
    
print (max - min)
  


Fixed submission:
n = int(input())
a = list(map(int, input().split()))
dist = []
for i in range(n):
    for j in range(n):
        if i >= j:
            continue
        dist.append(abs(a[i]-a[j]))
print(max(dist))
Buggy python submission (verdict: Runtime Error):
n = int(input())


sum = 0

for i in range(len(n)):
  sum += n[i]
  
if n % sum ==0:
  print("Yes")
else:
  print("No")

Fixed submission:
n = input()


sum = 0

for i in range(len(n)):
  sum += int(n[i])
  
if int(n) % sum ==0:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
d,n = map(int,input().split())

a=[]
k = 1
while len(a) == n:
  if (k % d < 100):
    a.append(k)
    
    
print(a[-1])


Fixed submission:
d, n = map(int, input().split())
if n != 100:
    print(n*100**d)
else:
    print((n+1)*100**d)
Buggy python submission (verdict: Runtime Error):
for i in range(100000):
  g = N -i
  a=sum(map(int,list(str(g))))
  b=sum(map(int,list(str(i))))
  ans =  a + b
  if ans == 0:
    num = ans
  elif num >= ans:
    num = ans
  else:
    continue

Fixed submission:
N =input()
list = [int(i) for i in N]

ans = sum(list)
if ans ==1:
  print(10)
else:
  print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
x=int(input())
c=1
for b in range(1,x):
    for p in range(2,x):
        if b**p<=x:c=max(c,b**p)
print(c)

Fixed submission:
import math 
x = int(input())
ans = 0

if x ==1:
  print(1)
  
else:
  for i in range(1,x//2):
    for j in range(2,11):
      tmp = i **j
      if tmp <= x:
        ans = max(ans,tmp)
        
  print(ans)
Buggy python submission (verdict: Runtime Error):
s = input()

num = 0
for i in range(len(s)):
  if s[i] == o:
    num +=100
  else:
    continue



print(700 + num)


Fixed submission:
print( 700 + 100*input().count("o"))

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

num = 0
for i in range(len(s)):
  if s[i] == o:
    num +=100



print(700 + num)

Fixed submission:
print( 700 + 100*input().count("o"))

Buggy python submission (verdict: Runtime Error):
print( 700 + 100*input().count("o")

Fixed submission:
print( 700 + 100*input().count("o"))

Buggy python submission (verdict: Runtime Error):
a,b,c = input().split()

S = a+b+c

j=0
if S[0] ==o:
  j += 100
if S[1] ==o:
  j += 100
if S[2] ==o:
  j += 100
  
print(700 + int(j))

Fixed submission:
print( 700 + 100*input().count("o"))
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = [input() for i in range(n)]
m = int(input())
t = [input() for i in range(n)]
ans = 0

for i in set(s):
  num = s.count(i) - t.count(i)
  if num > ans :
    ans = num
    
    
print(ans)




Fixed submission:
n = int(input())
s = [input() for i in range(n)]
m = int(input())
t = [input() for i in range(m)]
ans = 0

for i in set(s):
  num = s.count(i) - t.count(i)
  if num > ans :
    ans = num
    
    
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
s = [input() for i in range(n)]
m = int(input())
t = [input() for i in range(n)]
ans = 0

for i in set(s):
  num = s.count(i) - t.count(i)
  if num > ans :
    ans = num
    
    
print(ans)



Fixed submission:
n = int(input())
s = [input() for i in range(n)]
m = int(input())
t = [input() for i in range(m)]
ans = 0

for i in set(s):
  num = s.count(i) - t.count(i)
  if num > ans :
    ans = num
    
    
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
s = [input() for i in range(n)]
m = int(input())
t = [input() for i in range(n)]
ans = 0

for i in set(s):
  num = s.count(i) - t.count(s)
  if num > ans :
    ans = num
    
    
print(ans)

Fixed submission:
n = int(input())
s = [input() for i in range(n)]
m = int(input())
t = [input() for i in range(m)]
ans = 0

for i in set(s):
  num = s.count(i) - t.count(i)
  if num > ans :
    ans = num
    
    
print(ans)
Buggy python submission (verdict: Runtime Error):
A,B = map(int,input().split())


ans = 0
for i in range(A,B+1):
  num = map(int,list(str(i)))
  if num[1]==num[5] and num[2]==num[4]:
    ans += 1
    

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


ans = 0
for i in range(A,B+1):
  num = list(map(int,list(str(i))))
  if num[0]==num[4] and num[1]==num[3]:
    ans += 1


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

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

if set(s) <= 3:
  print("Three")
  
else: 
  print("Four")
         
         

Fixed submission:
n = int(input())

s = list(input().split())

if len(set(s)) <= 3:
  print("Three")
  
else: 
  print("Four")
Buggy python submission (verdict: Runtime Error):
def xx (a,b)
  
a = input()
b = input()

  if a*b %2 == 0:
    print("Even")
  else
    print("Odd")
    


def(1,21)

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

print("Even" if a*b%2==0 else "Odd")

Buggy python submission (verdict: Runtime Error):


def xx (a,b)
  
a = input()
b = input()

  if a*b %2 == 0:
    print("Even")
  else
    print("Odd")
    


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

print("Even" if a*b%2==0 else "Odd")
Buggy python submission (verdict: Runtime Error):
import math
a,b = input().split()

n = int(a+b)

for i in range(1000):
  if i**2 = n:
    print("Yes")
    exit()

print("No")

Fixed submission:

a,b = input().split()

n = int(a+b)

for i in range(1000):
  if i**2 == n:
    print("Yes")
    exit()

print("No")

Buggy python submission (verdict: Runtime Error):

a,b = input().split()

n = int(a+b)

for i in range(1000):
  if i**2 = n:
    print("Yes")
    exit()

print("No")

Fixed submission:

a,b = input().split()

n = int(a+b)

for i in range(1000):
  if i**2 == n:
    print("Yes")
    exit()

print("No")
Buggy python submission (verdict: Runtime Error):
s = ''.join(sorted(list(input())))
t = ''.join(sorte(list(input()),reverse = True))

is s < t:
  print("Yes")
else:
  print("No")


Fixed submission:
s = ''.join(sorted(list(input())))
t = ''.join(sorted(list(input()), reverse=True))

if s < t:
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
s = "".join(sorted(list(input())))
t = "".join(sorte(list(input()),reverse = True))

is s < t:
  print("Yes")
else:
  print("No")

Fixed submission:
s = ''.join(sorted(list(input())))
t = ''.join(sorted(list(input()), reverse=True))

if s < t:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
a = Counter(input().split())
ans += 0
for i in range(len(a)):
  if a.keys()[i][1] < int(a.keys()[i][0]):
    ans += a.keys()[i][0]
    
  elif a.keys()[i][1] >int(a.keys()[i][0]):
    ans +=(int(a.keys()[i][0])-a.keys()[i][1])
    
print(ans)
    
    
  

Fixed submission:
from collections import Counter
n = int(input())
a = Counter(input().split())
ans = 0
for i,j in a.items():
  i = int(i)
  if i>j:
    ans +=j
  elif i <j:
    ans += j-i
print(ans)
Buggy python submission (verdict: Runtime Error):
s = input()
a = []
for i in range(len(s)):
  a.append(s[i])
  

count = 0

for i in [0,3]:
  if a[i] == "1":
    count +=1
    
  
print(count)

Fixed submission:
s = input()
 
x = 0
 
 
for i in range(len(s)):
  if s[i] == "1":
    x += 1
  
print(x)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(i) for i in input().split()]
c = 0
i = 0
 
while a[i]%2 == 0:
  if a[i]%2 ==0:
    a[i]//=2
  if i==n-1:
    c+=1
    i = 0
  i+=1
print(c)


Fixed submission:
s = input()
 
x = 0
 
 
for i in range(len(s)):
  if s[i] == "1":
    x += 1
  
print(x)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(i) for i in input().split()]
count = 0
i = 0
 
while a[i]%2 == 0:
  if a[i]%2 ==0:
    a[i]//=2
  if i == n-1:
    count +=1
    i = 0
  i += 1
print(count)


Fixed submission:
s = input()
 
x = 0
 
 
for i in range(len(s)):
  if s[i] == "1":
    x += 1
  
print(x)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(i) for i in input().split()]
c = 0
i = 0
 
while a[i]%2 == 0:
  if a[i]%2 ==0:
    a[i]//=2
  if i == n-1:
    c +=1
    i = 0
  i += 1
print(c)

Fixed submission:
s = input()
 
x = 0
 
 
for i in range(len(s)):
  if s[i] == "1":
    x += 1
  
print(x)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(i) for i in input().split()]
c = 0
i = 0

while a[i]%2 == 0:
  if a[i]%2 ==0:
    a[i]//=2
  if i == n-1:
    count +=1
    i = 0
  i += 1
print(count)

Fixed submission:
s = input()
 
x = 0
 
 
for i in range(len(s)):
  if s[i] == "1":
    x += 1
  
print(x)
Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split())
a = [input().split() for i in range(n)]

d = {}
for i in a:
  if i in d:
    d[a] += 1
  else:
    d[a] = 1
    
    
d = sorted(d,values())
if len(d) > k:
  ans = 0
  for i in range(len(d)-k):
    ans += d[i]
  print(ans)
else:
  print(0)
  
  


Fixed submission:
n,k = map(int, input().split())
A = [int(x) for x in input().split()]
d = {}
for a in A:
  if a in d:
    d[a] +=1
  else:
    d[a] =1
    
d =sorted(d.values())
if len(d) > k:
  ans = 0
  for i in range(len(d)-k):
    ans += d[i]
  print(ans)
else:
  print(0)

Buggy python submission (verdict: Runtime Error):
n,k = map(int, input().split())
A = [int(x) for x in input().split()]
d = {}
for a in A:
  	if a in d:
    	d[a] +=1
  	eles:
    	d[a] =1
    
d =sorted(d.values())
if len(d) > k:
  	ans = 0
  	for i in range(len(d)-k):
    	ans += d[i]
  	print(ans)
else:
  	print(0)


Fixed submission:
n,k = map(int, input().split())
A = [int(x) for x in input().split()]
d = {}
for a in A:
  if a in d:
    d[a] +=1
  else:
    d[a] =1
    
d =sorted(d.values())
if len(d) > k:
  ans = 0
  for i in range(len(d)-k):
    ans += d[i]
  print(ans)
else:
  print(0)

Buggy python submission (verdict: Runtime Error):
N,K = map(int, input().split())
A = [int(x) for x in input().split()]
d = {}
for a in A:
  if a in d:
    d[a] +=1
  eles:
    d[a] =1
    
d =sorted(d.values())

if len(d) > K:
  ans = 0
  for i in range(len(d)-K):
    ans += d[i]
  print(ans)
else:
  print(0)


Fixed submission:
n,k = map(int, input().split())
A = [int(x) for x in input().split()]
d = {}
for a in A:
  if a in d:
    d[a] +=1
  else:
    d[a] =1
    
d =sorted(d.values())
if len(d) > k:
  ans = 0
  for i in range(len(d)-k):
    ans += d[i]
  print(ans)
else:
  print(0)

Buggy python submission (verdict: Runtime Error):
n,k = map(int, input().split())
A = [int(x) for x in input().split()]
d = {}
for a in A:
  if a in d:
    d[a] +=1
  eles:
    d[a] =1
    
d =sorted(d.values())
if len(d) > k:
  ans = 0
  for i in range(len(d)-k):
    ans += d[i]
  print(ans)
else:
  print(0)


Fixed submission:
n,k = map(int, input().split())
A = [int(x) for x in input().split()]
d = {}
for a in A:
  if a in d:
    d[a] +=1
  else:
    d[a] =1
    
d =sorted(d.values())
if len(d) > k:
  ans = 0
  for i in range(len(d)-k):
    ans += d[i]
  print(ans)
else:
  print(0)
Buggy python submission (verdict: Runtime Error):
N = map(int,input().split())

f = sum(list(map(int,str(N))))

if N % f == 0:
	print("Yes")
else:
	print("No")


Fixed submission:
N = int(input())
f = sum(map(int,list(str(N))))

if N % f == 0:
        print("Yes")
else:
        print("No")

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

f = sum(list(map(int,str(N))))

if N % f == 0:
print("Yes")
else:
print("No")


Fixed submission:
N = int(input())
f = sum(map(int,list(str(N))))

if N % f == 0:
        print("Yes")
else:
        print("No")

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

fx = sum(list(map(int,str(N))))

if N % fx == 0:
print("Yes")
else:
print("No")

Fixed submission:
N = int(input())
f = sum(map(int,list(str(N))))

if N % f == 0:
        print("Yes")
else:
        print("No")
Buggy python submission (verdict: Runtime Error):
n = int(input())
L = []
L.append(2)
L.append(1)

for i in range(2,84):
  L.append(L[i-2] + L[i-1])
  

print(L[n-1])

Fixed submission:
n = int(input())
L = []
L.append(2)
L.append(1)

for i in range(2,87):
  L.append(L[i-2] + L[i-1])
  

print(L[n])
Buggy python submission (verdict: Time Limit Exceeded):
n =int(input())

ans =[]
for i in range(1,n+1):
  if (i ** 0.5).is_integer() and i <= n:
    ans.append(i)
    
ans.sort()    
print(ans[-1])
    
    

    


Fixed submission:
n = int(input())
m = 1
for i in range(1, n):
    if i ** 2 > n:
        break
    m = i ** 2
print(m)

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

ans =[]
for i in range(10**9):
  if i > n:
    break
  
  if (i ** 0.5).is_integer() and i <= n:
    ans.append(i)
    
    
print(ans[-1])
    
    

    


Fixed submission:
n = int(input())
m = 1
for i in range(1, n):
    if i ** 2 > n:
        break
    m = i ** 2
print(m)

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

ans =[]
for i in range(10**9):
  if (i ** 0.5).is_integer() and i <= n:
    ans.append(i)
    
    
print(ans[-1])
    
    

    

Fixed submission:
n = int(input())
m = 1
for i in range(1, n):
    if i ** 2 > n:
        break
    m = i ** 2
print(m)