Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

n = int(input())
aa = np.array(list(map(int,input().split())))
a=np.sort(aa)
ah=[1]*len(a)

for i in range(n-1):
    if ah[i]==1:
        for j in range(i+1,n):
            wk1,wk0=divmod(a[j],a[i])
            ah[j]=min(wk0,ah[j])
            if wk1==1 and wk0==0:
                ah[i]=0
print(sum(ah))

Fixed submission:
import numpy as np

n = int(input())
a = np.array(list(map(int,input().split())))

amax=max(a)+1
ah=[0]*amax

for i in a:
    for j in range(i,amax,i):
        ah[j]+=1

an=0
for i in a:
    if ah[i]==1:
        an+=1
print(an)

Buggy python submission (verdict: Runtime Error):
import numpy as np
import sys

n = int(input())
aa = np.array(list(map(int,input().split())))

a=[i for i in aa if np.count_nonzero(aa==i)<2]
a=np.unique(a)
ah=[1]*len(a)

if len(ah) ==0:
    print(0)
    sys.exit()
for i in range(n-1):
    if ah[i]==1:
        for j in range(i+1,n):
            wk0=a[j]%a[i]
            if wk0==0:
                ah[j]=0

print(sum(ah))

Fixed submission:
import numpy as np

n = int(input())
a = np.array(list(map(int,input().split())))

amax=max(a)+1
ah=[0]*amax

for i in a:
    for j in range(i,amax,i):
        ah[j]+=1

an=0
for i in a:
    if ah[i]==1:
        an+=1
print(an)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
n = int(input())
aa = list(map(int,input().split()))
a=np.array(sorted(aa))
 
ad=[1]*n
 
for i in range(n-1):
    if ad[i]==1:
        for j in range(i+1,n):
            wk1,wk0=divmod(a[j],a[i])
            if wk0==0:
                if wk1==1:
                    ad[i]=0
                ad[j]=0
 
print(sum(ad))

Fixed submission:
import numpy as np

n = int(input())
a = np.array(list(map(int,input().split())))

amax=max(a)+1
ah=[0]*amax

for i in a:
    for j in range(i,amax,i):
        ah[j]+=1

an=0
for i in a:
    if ah[i]==1:
        an+=1
print(an)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

n = int(input())
aaa = list(map(int,input().split()))
aa=sorted(aaa)
a=np.array([[i,1] for i in aa])

for i in range(n-1):
    if a[i][1]==1:
        for j in range(i+1,n):
            wk1,wk0=divmod(a[j][0],a[i][0])
            if wk0==0:
                if wk1==1:
                    a[i][1]=0
                a[j][1]=0

print((np.sum(a,axis=0))[1])

Fixed submission:
import numpy as np

n = int(input())
a = np.array(list(map(int,input().split())))

amax=max(a)+1
ah=[0]*amax

for i in a:
    for j in range(i,amax,i):
        ah[j]+=1

an=0
for i in a:
    if ah[i]==1:
        an+=1
print(an)

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

ad=[1]*n
an=n

for i in range(n-1):
    if ad[i]==1:
        for j in range(i+1,n):
            wk1,wk0=divmod(a[j],a[i])
            if wk0==0:
                if wk1==1:
                    ad[i]=0
                ad[j]=0

print(sum(ad))

Fixed submission:
import numpy as np

n = int(input())
a = np.array(list(map(int,input().split())))

amax=max(a)+1
ah=[0]*amax

for i in a:
    for j in range(i,amax,i):
        ah[j]+=1

an=0
for i in a:
    if ah[i]==1:
        an+=1
print(an)

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

ad=[1]*n
an=n

for i in range(n-1):
    if ad[i]==1:
        for j in range(i+1,n):
            wk1,wk0=divmod(a[j],a[i])
            if wk0==0 and ad[j]==1:
                if wk1==1:
                    ad[i]=0
                ad[j]=0

print(sum(ad))

Fixed submission:
import numpy as np

n = int(input())
a = np.array(list(map(int,input().split())))

amax=max(a)+1
ah=[0]*amax

for i in a:
    for j in range(i,amax,i):
        ah[j]+=1

an=0
for i in a:
    if ah[i]==1:
        an+=1
print(an)

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

ad=[1]*n
an=n

ad = [0 if a.count(a[i])>1 else 1 for i in range(n)]

for i in range(n-1):
    if ad[i]==1:
        for j in range(i+1,n):
            if a[j]%a[i]==0 and ad[j]==1:
                ad[j]=0
print(sum(ad))

Fixed submission:
import numpy as np

n = int(input())
a = np.array(list(map(int,input().split())))

amax=max(a)+1
ah=[0]*amax

for i in a:
    for j in range(i,amax,i):
        ah[j]+=1

an=0
for i in a:
    if ah[i]==1:
        an+=1
print(an)

Buggy python submission (verdict: Time Limit Exceeded):
def waru(a,b):
    if a/b==1:
        return 2
    elif b%a==0:
        return 0
    else:
        return 1

n = int(input())
a = list(map(int,input().split()))

a.sort()
ad=[1]*n

for i in range(n-1):
    for j in range(i+1,n):
        wk=waru(a[i],a[j])
        if wk==2:
            ad[i]=0
            ad[j]=0
        else:            
            ad[j]=min(ad[j],wk)

print(sum(ad))

Fixed submission:
import numpy as np

n = int(input())
a = np.array(list(map(int,input().split())))

amax=max(a)+1
ah=[0]*amax

for i in a:
    for j in range(i,amax,i):
        ah[j]+=1

an=0
for i in a:
    if ah[i]==1:
        an+=1
print(an)