Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
a, b, c = (int, raw_input().split())
 
if a == b or a == c:
  print ('Yes')
elif b == c:
  print ('Yes')
else:
  print ('No')

Fixed submission:
a, b, c = map(int, input().split())
 
if (a == b and c != a) or (a == c and b != a):
  print ('Yes')
elif b == c and a != b:
  print ('Yes')
else:
  print ('No')

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

if a == b or a == c:
  print ('Yes')
elif b == c:
  print ('Yes')
else:
  print ('No')

Fixed submission:
a, b, c = map(int, input().split())
 
if (a == b and c != a) or (a == c and b != a):
  print ('Yes')
elif b == c and a != b:
  print ('Yes')
else:
  print ('No')
Buggy python submission (verdict: Time Limit Exceeded):
def sumPair(A):
    L = len(A)
    M = 1000000007
    total_sum = 0
    
    for i in range(0, L):
        for j in range(i+1, L):
            pair_m = A[i] * A[j]
            total_sum = (total_sum + pair_m) % M
    return total_sum
        

N = int(input())
A = list(map(int, input().rstrip().split()))
print(sumPair(A))

Fixed submission:
def fastSumPair(A):
    L = len(A)
    M = 1000000007
    
    # (a + b + c)**2 = a**2 + b**2 + c**2 + 2*(a*b + b*c + c*a)
    # derive from this equation
    
    # first array
    A_1_sum = 0
    for i in range(0, L):
        A_1_sum = (A_1_sum + A[i]) 
    
    A_1_sum = (A_1_sum ** 2) 
        
    # second array
    A_2_sum = 0
    for i in range(0, L):
        A_2_sum = (A_2_sum + A[i] ** 2) 
                  
    return int((A_1_sum - A_2_sum) // 2) % M        

N = int(input())
A = list(map(int, input().rstrip().split()))
print(fastSumPair(A))
Buggy python submission (verdict: Runtime Error):
l = input().split()
if l[0]*l[1]%2 ==0:
    print(Even)
    else:
    print(Odd)

Fixed submission:
l= list(map(int, input().split()))
if l[0]*l[1]%2 ==0:
    print("Even")
else:
    print("Odd")
Buggy python submission (verdict: Runtime Error):
N,Y = map(int,input().split())
for i in range(N+1):
    if (Y - 1000*N -9000*i) % 4000 == 0:
        b = (Y - 1000*N -9000*i) // 4000 
        c = N - i - b
        if b >= 0 and c >= 0:
            print(a,b,c)
            exit()
print("-1 -1 -1")

Fixed submission:
l = list(map(int,input().split()))
N = l[0]
Y = l[1]

l = list()

for i in range(N+1):
    a = i
    if (Y - 1000*N -9000*a) % 4000 == 0:
        b = (Y - 1000*N -9000*a) // 4000 
        c = N - a - b
        if a >= 0 and b >= 0 and c >= 0:
            l.append([a,b,c])
            break

if len(l) ==0:
    print("-1 -1 -1")
else:
    ans = l[0]
    print(ans[0],ans[1],ans[2])
Buggy python submission (verdict: Time Limit Exceeded):
import itertools
import numpy as np

N = int(input())

L = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

count = 0
ptr_num = np.array(list(itertools.product(L, repeat=N)))

print(np.count_nonzero(np.any(ptr_num == 0, axis=1) & np.any(ptr_num == 9, axis=1)))

Fixed submission:
NUM = 1000000007

N = int(input())

all_colab = pow(10, N)
except_0or9_colab = pow(9, N)
except_0and9_colab = pow(8, N)

include_0and9_colab = all_colab - (2*except_0or9_colab - except_0and9_colab)

print(include_0and9_colab % NUM)

Buggy python submission (verdict: Time Limit Exceeded):
import itertools

N = int(input())

L = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
A = list(itertools.product(L, repeat=N))

count = 0

for a in A:
    if (0 in a) and (9 in a):
        count += 1

print(count % (1000000007))


Fixed submission:
NUM = 1000000007

N = int(input())

all_colab = pow(10, N)
except_0or9_colab = pow(9, N)
except_0and9_colab = pow(8, N)

include_0and9_colab = all_colab - (2*except_0or9_colab - except_0and9_colab)

print(include_0and9_colab % NUM)
Buggy python submission (verdict: Runtime Error):
def divisor(n): 
    i = 1
    table = []
    while i * i <= n:
        if n % i == 0:
            table.append(i)
            table.append(n//i)
        i += 1
    table = list(set(table))
    return table

A, B, K = map(int, input().split(" "))

a_divisor = divisor(A)
b_divisor = divisor(B)

print(sorted(list(set(a_divisor) & set(b_divisor)), reverse=True)[K])

Fixed submission:
def divisor(n): 
    i = 1
    table = []
    while i * i <= n:
        if n % i == 0:
            table.append(i)
            table.append(n//i)
        i += 1
    table = list(set(table))
    return table

A, B, K = map(int, input().split(" "))

a_divisor = divisor(A)
b_divisor = divisor(B)

print(sorted(list(set(a_divisor) & set(b_divisor)), reverse=True)[K-1])

Buggy python submission (verdict: Runtime Error):
def divisor(n): 
    i = 1
    table = []
    while i * i <= n:
        if n % i == 0:
            table.append(i)
            table.append(n//i)
        i += 1
    table = list(set(table))
    return table

A, B, K = map(int, input().split(" "))

a_divisor = divisor(A)
b_divisor = divisor(B)

print(sorted(list(set(a_divisor) & set(b_divisor)), reverse=True)[1])

Fixed submission:
def divisor(n): 
    i = 1
    table = []
    while i * i <= n:
        if n % i == 0:
            table.append(i)
            table.append(n//i)
        i += 1
    table = list(set(table))
    return table

A, B, K = map(int, input().split(" "))

a_divisor = divisor(A)
b_divisor = divisor(B)

print(sorted(list(set(a_divisor) & set(b_divisor)), reverse=True)[K-1])
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
p=list(map(int,input().split()))
l=n
ans=0
for i in range(1,n+1):
    if p.index(i)<l:
        ans+=1
        l=p.index(i)
print(ans)


Fixed submission:
n=int(input())
p=list(map(int,input().split()))
m=float('INF')
ans=0

for i in range(n):
    if p[i]<=m:
        ans+=1
        m=p[i]
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n,m=map(int,input().split())
ac=[]
wa=[0]*n
a=0
w=0
for i in range(m):
    l=input().split()
    if ac.count(l[0])==0:
        if l[1]=='AC':
            ac.append(l[0])
            a+=1
            w+=wa[int(l[0])-1]
        else:
            wa[int(l[0])-1]+=1
    if a==n:
        break
print(a,w)


Fixed submission:
n,m=map(int,input().split())
ac={}
wa=[0]*n
a=0
w=0
for i in range(n):
    ac[i+1]=0
    
for i in range(m):
    l=input().split()
    if ac[int(l[0])]!='AC':
        if l[1]=='AC':
            ac[int(l[0])]='AC'
            a+=1
            w+=wa[int(l[0])-1]
        else:
            wa[int(l[0])-1]+=1
    if a==n:
        break
print(a,w)
Buggy python submission (verdict: Runtime Error):
from math import gcd
a,b = map(int,input().split())
print(int(a*b/gcd(a,b)))


Fixed submission:
a,b = map(int,input().split())
x=max(a,b)
y=min(a,b)

def gcd(m,n):
    x=max(m,n)
    y=min(m,n)
    if x%y==0:
        return y
    else:
        while x%y!=0:
            z=x%y
            x=y
            y=z
        else:
            return z

ans=a*b/gcd(a,b)
print(int(ans))

Buggy python submission (verdict: Runtime Error):
from math import gcd
a,b=map(int,input().split())
print(gcd(a,b))

Fixed submission:
a,b = map(int,input().split())
x=max(a,b)
y=min(a,b)

def gcd(m,n):
    x=max(m,n)
    y=min(m,n)
    if x%y==0:
        return y
    else:
        while x%y!=0:
            z=x%y
            x=y
            y=z
        else:
            return z

ans=a*b/gcd(a,b)
print(int(ans))

Buggy python submission (verdict: Runtime Error):
a,b = map(int,input().split())
ans=a * b / gcd(a, b)
print(ans)

Fixed submission:
a,b = map(int,input().split())
x=max(a,b)
y=min(a,b)

def gcd(m,n):
    x=max(m,n)
    y=min(m,n)
    if x%y==0:
        return y
    else:
        while x%y!=0:
            z=x%y
            x=y
            y=z
        else:
            return z

ans=a*b/gcd(a,b)
print(int(ans))

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

Fixed submission:
a,b = map(int,input().split())
x=max(a,b)
y=min(a,b)

def gcd(m,n):
    x=max(m,n)
    y=min(m,n)
    if x%y==0:
        return y
    else:
        while x%y!=0:
            z=x%y
            x=y
            y=z
        else:
            return z

ans=a*b/gcd(a,b)
print(int(ans))
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
li = list(map(int,input().split()))
if li.count(1)==0:
    print(-1)
else:
    del li[0:li.index(1)]
    for k in range (2,n+1):
        if li.count(k)==0:
            del li[k-1:]
            break
        else:
            del li[k-1:li.index(k)]
    print(n-len(li))


Fixed submission:
n=int(input())
a=list(map(int,input().split()))
x=1
ans=0
for i in range(n):
    if a[i]!=x:
        ans+=1
    else:
        x+=1
if ans==n:
    print(-1)
else:
    print(ans)
Buggy python submission (verdict: Runtime Error):
A1,A2,A3=map(int,input().split())
A=A1+A2+A3
if　A>=22:
  print("bust")
else
	print("win")


Fixed submission:
li = list(map(int,input().split()))
if li[0]+li[1]+li[2]>=22:
  print('bust')
else:
	print('win')
Buggy python submission (verdict: Runtime Error):
r=input()
print(r*r)

Fixed submission:
r=int(input())
print(r*r)

Buggy python submission (verdict: Runtime Error):
r=input()
print(r*r

Fixed submission:
r=int(input())
print(r*r)

Buggy python submission (verdict: Runtime Error):
r=input()
print(r^2)

Fixed submission:
r=int(input())
print(r*r)
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=input().split()
ans=''
for i in range(1,n+1):
    ans+=str(a.index(str(i))+1)+' '

print(ans)


Fixed submission:
n=int(input())
if n%2==0:
	print(1/2)
else:
  	print((n-(n-1)/2)/n)

Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(input())
ans=''
for i in range(1,n+1):
    ans+=str(a.index(str(i))+1)+' '

print(ans)


Fixed submission:
n=int(input())
if n%2==0:
	print(1/2)
else:
  	print((n-(n-1)/2)/n)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=input().split()
ans=''
for i in range(1,n+1):
    ans+=str(a.index(str(i))+1)+' '

print(ans)


Fixed submission:
n=int(input())
a=list(map(int,input().split()))
b=[0]*n
for i in range(n):
    b[a[i]-1]=str(i+1)

print(' '.join(b))

Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(input())
ans=''
for i in range(1,n+1):
    ans+=str(a.index(str(i))+1)+' '

print(ans)


Fixed submission:
n=int(input())
a=list(map(int,input().split()))
b=[0]*n
for i in range(n):
    b[a[i]-1]=str(i+1)

print(' '.join(b))

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
ans=''
for i in range(1,n+1):
    ans+=str(a.index(i)+1)+' '

print(ans)


Fixed submission:
n=int(input())
a=list(map(int,input().split()))
b=[0]*n
for i in range(n):
    b[a[i]-1]=str(i+1)

print(' '.join(b))

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
ans=''
for i in range(1,n+1):
    ans+=str(a.index(i)+1)+' '

print(ans)


Fixed submission:
n=int(input())
a=list(map(int,input().split()))
b=[0]*n
for i in range(n):
    b[a[i]-1]=str(i+1)

print(' '.join(b))
Buggy python submission (verdict: Runtime Error):
a=int(input())
s=int(input())

if a>=3200:
  print(s)
else:
  print('red')

Fixed submission:
a=int(input())
s=input()
if a>=3200:
    print(s)
else:print('red')
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=[]
ans=0
for i in range(n):
    s=list(input())
    s.sort()
    ans+=a.count(s)
    a.append(s)
print(ans)


Fixed submission:
n=int(input())
d={}
ans=0
for i in range(n):
    s=list(input())
    s.sort()
    l=''.join(s)
    if l in d:
        ans+=d[l]
        d[l]+=1
    else:
        d[l]=1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
s=[]
ans=0
for i in range(n):
    s.append(input())

for j in range(n):
    for k in range(j+1,n):
        if sorted(list(s[j]))==sorted(list(s[k])):
                ans+=1
print(ans)


Fixed submission:
n=int(input())
d={}
ans=0
for i in range(n):
    s=list(input())
    s.sort()
    l=''.join(s)
    if l in d:
        ans+=d[l]
        d[l]+=1
    else:
        d[l]=1
print(ans)
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
a=0
if m!=0:
    a=int(input())
b=1
s=[1]*(n+1)
for i in range(1,n+1):
    if i!=a:
        if i-2>=0:
            s[i]=(s[i-1]+s[i-2])%1000000007
        else:
            s[i]=s[i-1]%1000000007
    elif b!=m:
        s[i]=0
        a=int(input())
        b+=1
    else:
        s[i]=0
print(s[n])
        


Fixed submission:
li=list(map(int,input().split()))
print(min(li[0]+li[1],li[0]+li[2],li[1]+li[2]))
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
a=int(input())
b=1
s=[1]*(n+1)
for i in range(1,n+1):
    if i!=a:
        if i-2>=0:
            s[i]=(s[i-1]+s[i-2])%1000000007
        else:
            s[i]=s[i-1]%1000000007
    elif b!=m:
        s[i]=0
        a=int(input())
        b+=1
    else:
        s[i]=0
print(s[n])
        


Fixed submission:
n,m=map(int,input().split())
a=0
if m!=0:
    a=int(input())
    
b=1
s=[1]*(n+1)
for i in range(1,n+1):
    if i!=a:
        if i-2>=0:
            s[i]=(s[i-1]+s[i-2])%1000000007
        else:
            s[i]=s[i-1]%1000000007
    elif b!=m:
        s[i]=0
        a=int(input())
        b+=1
    else:
        s[i]=0
print(s[n])

Buggy python submission (verdict: Time Limit Exceeded):
n,m=map(int,input().split())
a=[int(input()) for i in range(m)]
s=[0]*(n+1)
s[0]=1
for i in range(1,n+1):
    if a.count(i)!=0:
        s[i]=0
    else:
        if i-2>=0:
            s[i]+=(s[i-1]+s[i-2])%1000000007
        else:
            s[i]+=s[i-1]%1000000007
print(s[n])
        


Fixed submission:
n,m=map(int,input().split())
a=0
if m!=0:
    a=int(input())
    
b=1
s=[1]*(n+1)
for i in range(1,n+1):
    if i!=a:
        if i-2>=0:
            s[i]=(s[i-1]+s[i-2])%1000000007
        else:
            s[i]=s[i-1]%1000000007
    elif b!=m:
        s[i]=0
        a=int(input())
        b+=1
    else:
        s[i]=0
print(s[n])

Buggy python submission (verdict: Time Limit Exceeded):
n,m=map(int,input().split())
a=[int(input()) for i in range(m)]
s=[0]*(n+1)
s[0]=1
for i in range(1,n+1):
    if a.count(i)!=0:
        s[i]=0
    else:
        if i-2>=0:
            s[i]+=s[i-1]+s[i-2]
        else:
            s[i]+=s[i-1]
print(s[n]%1000000007)
        


Fixed submission:
n,m=map(int,input().split())
a=0
if m!=0:
    a=int(input())
    
b=1
s=[1]*(n+1)
for i in range(1,n+1):
    if i!=a:
        if i-2>=0:
            s[i]=(s[i-1]+s[i-2])%1000000007
        else:
            s[i]=s[i-1]%1000000007
    elif b!=m:
        s[i]=0
        a=int(input())
        b+=1
    else:
        s[i]=0
print(s[n])
Buggy python submission (verdict: Time Limit Exceeded):
n,k = map(int,input().split())
p=0
a=0
p_s=(1/n)
for i in range(1,n+1):
    while i<k:
        i*2
        p_s/=2
    p+=p_s
print(p)


Fixed submission:
from math import log2
from math import ceil
n,k=map(int,input().split())
p=0


for i in range(1,n+1):
    if i>=k:
        p+=1/n
    else:
        cnt=ceil(log2(k)-log2(i))
        p+=(1/n)*((1/2)**cnt)
    

print(p)
Buggy python submission (verdict: Runtime Error):
a=[]
b=[]
for i in range(5):
    x=int(input())
    a.append(x)
    if x%10!=0:
        b.append(10-x%10)
b.sort()
print(sum(a)+sum(b)-max(b))
    


Fixed submission:
a=[]
b=[]
for i in range(5):
    x=int(input())
    a.append(x)
    if x%10!=0:
        b.append(10-x%10)
if a[0]%10==0 and a[1]%10==0 and a[2]%10==0 and a[3]%10==0 and a[4]%10==0:
    print(sum(a))
else:
    b.sort()
    print(sum(a)+sum(b)-max(b))
Buggy python submission (verdict: Runtime Error):
s=input()
a=0
A=[]
for i in range(len(s)):
    if s[i]=='A' or s[i]=='T' or s[i]=='G' or s[i]=='C':
        a+=1
        A.append(a)
    else:
        a=0
print(max(A))


Fixed submission:
s=input()
a=0
A=[0]
for i in range(len(s)):
    if s[i]=='A' or s[i]=='T' or s[i]=='G' or s[i]=='C':
        a+=1
        A.append(a)
    else:
        a=0
print(max(A))

Buggy python submission (verdict: Runtime Error):
s=input()
a=0
A=[]
for i in range(len(s)):
    if s[i]=='A' or s[i]=='T' or s[i]=='G' or s[i]=='C':
        a+=1
    else:
        A.append(a)
        a=0
print(max(A))


Fixed submission:
s=input()
a=0
A=[0]
for i in range(len(s)):
    if s[i]=='A' or s[i]=='T' or s[i]=='G' or s[i]=='C':
        a+=1
        A.append(a)
    else:
        a=0
print(max(A))
Buggy python submission (verdict: Time Limit Exceeded):
n,q=map(int,input().split())
s=input()
for i in range(q):
    l,r=map(int,input().split())
    print(s[l-1:r].count('AC'))


Fixed submission:
n,q=map(int,input().split())
s=input()
t=[0]*n
a=0
for i in range(n-1):
    if s[i:i+2]=='AC':
        a+=1
    t[i+1]=a
for i in range(q):
    l,r=map(int,input().split())
    print(t[r-1]-t[l-1])

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

for i in range(q):
    l,r=map(int,input().split())
    t=s[l-1:r]
    print(t.count('AC'))


Fixed submission:
n,q=map(int,input().split())
s=input()
t=[0]*n
a=0
for i in range(n-1):
    if s[i:i+2]=='AC':
        a+=1
    t[i+1]=a
for i in range(q):
    l,r=map(int,input().split())
    print(t[r-1]-t[l-1])
Buggy python submission (verdict: Time Limit Exceeded):
s=list(input())
n=len(s)
for i in range(len(s)//2+1):
    t=''.join(s)
    if t.count('01')>0:
        del s[t.index('01'):t.index('01')+2]
    elif t.count('10')>0:
        del s[t.index('10'):t.index('10')+2]
    else:
        break
print(n-len(s))


Fixed submission:
s=list(input())
print(len(s)-(max(s.count('0'),s.count('1'))-min(s.count('0'),s.count('1'))))
Buggy python submission (verdict: Runtime Error):
from collections import deque
n=int(input())
v=list(map(int,input().split()))
d1={}
d2={}
l1=[]
l2=[]
for i in range(n):
    num=v[i]
    if i%2==0:
        try:
            d1[num]+=1
        except:
            d1[num]=1
    else:
        try:
            d2[num]+=1
        except:
            d2[num]=1
for i in d1:
    l1.append([d1[i],i])
for i in d2:
    l2.append([d2[i],i])
l1.sort(reverse=True)
l2.sort(reverse=True)
ans=n
if l1[0][1]!=l2[0][1]:
    ans-=(l1[0][0]+l2[0][0])
elif len(l1)==1 and len(l2)==1:
    ans//=2
elif len(l1)==1:
    ans-=l2[1][0]
elif len(l2)==1
    ans-=l1[1][0]
else:
    a=ans-l1[0][0]-l2[1][0]
    b=ans-l1[1][0]-l2[0][0]
    ans=min(a,b)
print(ans)


Fixed submission:
n=int(input())
v=list(map(int,input().split()))
d1={}
d2={}
l1=[]
l2=[]
for i in range(n):
    num=v[i]
    if i%2==0:
        try:
            d1[num]+=1
        except:
            d1[num]=1
    else:
        try:
            d2[num]+=1
        except:
            d2[num]=1
for i in d1:
    l1.append([d1[i],i])
for i in d2:
    l2.append([d2[i],i])
l1.sort(reverse=True)
l2.sort(reverse=True)
ans=n
if l1[0][1]!=l2[0][1]:
    ans-=(l1[0][0]+l2[0][0])
elif len(l1)==1 and len(l2)==1:
    ans//=2
elif len(l1)==1:
    ans-=l2[1][0]
elif len(l2)==1:
    ans-=l1[1][0]
else:
    a=ans-l1[0][0]-l2[1][0]
    b=ans-l1[1][0]-l2[0][0]
    ans=min(a,b)
print(ans)

Buggy python submission (verdict: Runtime Error):
n=int(input())
v=list(map(int,input().split()))
da={}
db={}
maxa=0
maxa2=0
maxb=0
maxb2=0
if n==v.count(v[0]):
    print(n//2)
else:
    for i in range(n):
        if i%2==0:
            try:
                da[v[i]]+=1
            except:
                da[v[i]]=1
            if da[v[i]]>maxa:
                maxa2=maxa
                maxa=v[i]
        else:
            try:
                db[v[i]]+=1
            except:
                db[v[i]]=1
            if db[v[i]]>maxb:
                maxb2=maxb
                maxb=v[i]
    if maxa!=maxb:
        print(n-da[maxa]-db[maxb])
    else:
        print(min(n-da[maxa]-db[maxb2],n-da[maxa2]-db[maxb]))





Fixed submission:
n=int(input())
v=list(map(int,input().split()))
d1={}
d2={}
l1=[]
l2=[]
for i in range(n):
    num=v[i]
    if i%2==0:
        try:
            d1[num]+=1
        except:
            d1[num]=1
    else:
        try:
            d2[num]+=1
        except:
            d2[num]=1
for i in d1:
    l1.append([d1[i],i])
for i in d2:
    l2.append([d2[i],i])
l1.sort(reverse=True)
l2.sort(reverse=True)
ans=n
if l1[0][1]!=l2[0][1]:
    ans-=(l1[0][0]+l2[0][0])
elif len(l1)==1 and len(l2)==1:
    ans//=2
elif len(l1)==1:
    ans-=l2[1][0]
elif len(l2)==1:
    ans-=l1[1][0]
else:
    a=ans-l1[0][0]-l2[1][0]
    b=ans-l1[1][0]-l2[0][0]
    ans=min(a,b)
print(ans)
Buggy python submission (verdict: Runtime Error):
d,n=map(int,input().split())
a=[]
if d!=0:
    print(100**d*n)
else:
    for i in range(1,n**3):
        if i!=100:
            a.append(i)
    print(a[n-1])


Fixed submission:
d,n=map(int,input().split())
a=[]
for i in range(1,2*n* 100**d):
    if i% 100**d==0 and i % 100**(d+1)!=0:
        a.append(i)
print(a[n-1])
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
s=input()
ans=s[1:].count('E')

for i in range(1,n):
    x=s[:i].count('W')+s[i+1:].count('E')
    ans=min(x,ans)
print(ans)


Fixed submission:
n=int(input())
s=input()
w=0
et=s.count('E')
ans=float('INF')
for i in range(n):
    a=w
    if s[i]=='W':
        w+=1
    e=et-(i+1-w)
    ans=min(ans,a+e)
print(ans)
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))

m=max(a)/2
a.append(m)
a.sort()
ind=a.index(m)

if abs(m-a[ind-1])<abs(m-a[ind+1]):
    print(max(a),a[ind-1])
else:
    print(max(a),a[ind+1])


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

if li[0]<=li[2] and li[0]+li[1]>=li[2]:
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Time Limit Exceeded):
import copy
n=int(input())
x=list(map(int,input().split()))

for i in range(n):
    y=copy.copy(x)
    del y[i]
    y.sort()
    print(y[n//2-1])


Fixed submission:
n=int(input())
x=list(map(int,input().split()))
y=x.copy()
y.sort()
cr=y[n//2]
cl=y[n//2-1]

for i in range(n):
    if x[i]<=cl:
        print(cr)
    elif x[i]>=cr:
        print(cl)

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


for i in range(n):
    y=[]
    for j in range(n):
        if j!=i:
            y.append(x[j])
    y.sort()
    print(y[n//2-1])


Fixed submission:
n=int(input())
x=list(map(int,input().split()))
y=x.copy()
y.sort()
cr=y[n//2]
cl=y[n//2-1]

for i in range(n):
    if x[i]<=cl:
        print(cr)
    elif x[i]>=cr:
        print(cl)
Buggy python submission (verdict: Time Limit Exceeded):
li = list(map(int,input().split()))
for i in range(li[0],li[1]+1):
    if i<=li[0]+li[2]-1 or i>=li[1]-li[2]+1:
        print(i)


Fixed submission:
li = list(map(int,input().split()))
for i in range(li[0],min(li[1]+1,li[0]+li[2])):
    print(i)
for k in range(li[1]-li[2]+1,li[1]+1):
    if k>li[0]+li[2]-1:
        print(k)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
d={}
l=[]
for i in range(n):
    if l.count(a[i])==0:
        d[a[i]]=1
        l.append(a[i])
    else:
        d[a[i]]+=1

ans=0
for i in range(len(l)):
    if d[l[i]]>l[i]:
        ans+=d[l[i]]-l[i]
    elif d[l[i]]<l[i]:
        ans+=d[l[i]]
print(ans)


Fixed submission:
n=int(input())
a=list(map(int,input().split()))
d={}
l=[]
for i in range(n):
    try:
        d[a[i]]+=1
    except:
        d[a[i]]=1
        l.append(a[i])

ans=0
for i in range(len(l)):
    if d[l[i]]>l[i]:
        ans+=d[l[i]]-l[i]
    elif d[l[i]]<l[i]:
        ans+=d[l[i]]
print(ans)