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

m = [0]*(10**6 + 1)

for i in a:
    if m[i] == 1:
        m[i] = 2
        continue
    tmp = i 
    for j in range(i,10**6+1,i):
        m[j]+=1
ans = 0
for i in a:
    if m[i] == 1:
        ans += 1
print(ans)

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

ma = max(a)
m = [0]*(ma + 1)

for i in a:
    if m[i] == 1:
        m[i] = 2
        continue
    for j in range(i,ma+1,i):
        m[j]+=1
ans = 0
for i in a:
    if m[i] == 1:
        ans += 1
print(ans)

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

m = [0]*(10**6 + 1)

for i in a:
    if m[i] == 1:
        m[i] = 2
        continue
    tmp = i 
    while tmp <= 10**6:
        m[tmp] += 1
        tmp += i
ans = 0
for i in a:
    if m[i] == 1:
        ans += 1
print(ans)

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

ma = max(a)
m = [0]*(ma + 1)

for i in a:
    if m[i] == 1:
        m[i] = 2
        continue
    for j in range(i,ma+1,i):
        m[j]+=1
ans = 0
for i in a:
    if m[i] == 1:
        ans += 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
from numba import njit
n = int(input())
a = np.array(list(map(int,input().split())),np.int32)

@njit(cache=True)
def solve():
    m = np.zeros(10**6 + 1)
    for i in a:
        if m[i] == 1:
            m[i] = 2
            continue
        m[::i] += 1
    ans = 0
    for i in a:
        if m[i] == 1:
            ans += 1
    print(ans)

solve()

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

ma = max(a)
m = [0]*(ma + 1)

for i in a:
    if m[i] == 1:
        m[i] = 2
        continue
    for j in range(i,ma+1,i):
        m[j]+=1
ans = 0
for i in a:
    if m[i] == 1:
        ans += 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
from numba import njit
n = int(input())
a = np.array(list(map(int,input().split())),np.int32)

@njit
def solve():
    m = np.zeros(10**6 + 1)
    for i in a:
        if m[i] == 1:
            m[i] = 2
            continue
        m[::i] += 1
    ans = 0
    for i in a:
        if m[i] == 1:
            ans += 1
    print(ans)

solve()

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

ma = max(a)
m = [0]*(ma + 1)

for i in a:
    if m[i] == 1:
        m[i] = 2
        continue
    for j in range(i,ma+1,i):
        m[j]+=1
ans = 0
for i in a:
    if m[i] == 1:
        ans += 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
n = int(input())
a = np.array(list(map(int,input().split())),np.int32)

m = np.zeros(10**6 + 1,np.int32)

for i in a:
    if m[i] == 1:
        m[i] = 2
        continue
    m[::i] += 1
ans = 0
for i in a:
    if m[i] == 1:
        ans += 1
print(ans)

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

ma = max(a)
m = [0]*(ma + 1)

for i in a:
    if m[i] == 1:
        m[i] = 2
        continue
    for j in range(i,ma+1,i):
        m[j]+=1
ans = 0
for i in a:
    if m[i] == 1:
        ans += 1
print(ans)

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

m = np.zeros(10**6 + 1)

for i in a:
    if m[i] == 1:
        m[i] = 2
        continue
    m[::i] += 1
    '''
    while tmp <= 10**6:
        m[tmp] += 1
        tmp += i
    '''
ans = 0
for i in a:
    if m[i] == 1:
        ans += 1
print(ans)

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

ma = max(a)
m = [0]*(ma + 1)

for i in a:
    if m[i] == 1:
        m[i] = 2
        continue
    for j in range(i,ma+1,i):
        m[j]+=1
ans = 0
for i in a:
    if m[i] == 1:
        ans += 1
print(ans)

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


m = [0]*(10**6 + 1)

for i in a:
    if m[i] == 1:
        m[i] = 2
        continue
    tmp = i 
    while tmp <= 10**6:
        m[tmp] += 1
        tmp += i
ans = 0
for i in a:
    if m[i] == 1:
        ans += 1
print(ans)

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

ma = max(a)
m = [0]*(ma + 1)

for i in a:
    if m[i] == 1:
        m[i] = 2
        continue
    for j in range(i,ma+1,i):
        m[j]+=1
ans = 0
for i in a:
    if m[i] == 1:
        ans += 1
print(ans)