Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
As = list(map(int, input().split(' ')))
 
not_divisible = 0
for num_i, Ai in enumerate(As):
    for num_j, Aj in enumerate(As):
        if num_i==num_j:
            continue
        if Ai%Aj==0:
            break
    else:
        not_divisible += 1
print(not_divisible)


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

max_a = max(a)
dp = [0] * (max_a + 1)

for i in a:
    for j in range(i, max_a+1, i):
        dp[j] += 1
        
print([dp[i] for i in a].count(1))

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

not_divisible = 0
for num_i, Ai in enumerate(As):
    for num_j, Aj in enumerate(As):
        if num_i==num_j:
            continue
        if Ai%Aj==0:
            break
    else:
        not_divisible += 1
print(not_divisible)

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

max_a = max(a)
dp = [0] * (max_a + 1)

for i in a:
    for j in range(i, max_a+1, i):
        dp[j] += 1
        
print([dp[i] for i in a].count(1))

Buggy python submission (verdict: Time Limit Exceeded):
from numba import jit
from numba.typed import List
import numpy as np

N = int(input())
As = np.array(list(map(int, input().split(' '))))


@jit
def test(As):
    num_i = 0
    num_j = 0
    not_divisible = 0
    for num_i, Ai in enumerate(As):
        for num_j, Aj in enumerate(As):
            if num_i==num_j:
                continue
            if Ai%Aj==0:
                break
        else:
            not_divisible += 1
    print(not_divisible)
    
test(As)

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

max_a = max(a)
dp = [0] * (max_a + 1)

for i in a:
    for j in range(i, max_a+1, i):
        dp[j] += 1
        
print([dp[i] for i in a].count(1))

Buggy python submission (verdict: Runtime Error):
import numpy as np
N = int(input())
As = list(map(int, input().split(' ')))
As = np.array(As)

not_divisible = np.sum(np.sum(As[None]%As[:,None]==0, 0)==1)
print(not_divisible)

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

max_a = max(a)
dp = [0] * (max_a + 1)

for i in a:
    for j in range(i, max_a+1, i):
        dp[j] += 1
        
print([dp[i] for i in a].count(1))

Buggy python submission (verdict: Runtime Error):
import numpy as np
N = int(input())
As = list(map(int, input().split(' ')))
As = np.unique(np.array(As))

divisible = np.sum(np.sum((As[None]%As[:,None])==0, 0)>1)
print(divisible)

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

max_a = max(a)
dp = [0] * (max_a + 1)

for i in a:
    for j in range(i, max_a+1, i):
        dp[j] += 1
        
print([dp[i] for i in a].count(1))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
As = list(map(int, input().split(' ')))

not_divisible = 0
for num1, Ai in enumerate(As):
    for num2, Aj in enumerate(As):
        if num1==num2:
            continue
        if Ai%Aj == 0:
            break
    else:
        not_divisible += 1
print(not_divisible)

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

max_a = max(a)
dp = [0] * (max_a + 1)

for i in a:
    for j in range(i, max_a+1, i):
        dp[j] += 1
        
print([dp[i] for i in a].count(1))