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

def main():
    N = int(input())
    An = list(map(int, input().split()))
    ok = [False] * N
    a_An = np.array(An)
    for i, a in enumerate(An):
        temp = a_An / a
        temp[i] = 0.1
        check = (temp % 1 == 0)
        ok = ok | check
    print(np.count_nonzero(ok == 0))


if __name__ == "__main__":
    main()

Fixed submission:
N = int(input())
An = list(map(int, input().split()))
An.sort()
max_n = max(An)
dp = [0] * (max_n + 1)
for i in range(N):
    if dp[An[i]] != 0:
        dp[An[i]] = 2
        continue
    for j in range(1, max_n//An[i] + 1):
        dp[An[i]*j] += 1
ans = 0
for a in An:
    if dp[a] == 1:
        ans += 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N = int(input())
An = list(map(int, input().split()))
ok = [False] * N
a_An = np.array(An)
for i, a in enumerate(An):
    temp = a_An / a
    temp[i] = 0.1
    check = (temp % 1 == 0)
    ok = ok | check
print(np.count_nonzero(ok == 0))

Fixed submission:
N = int(input())
An = list(map(int, input().split()))
An.sort()
max_n = max(An)
dp = [0] * (max_n + 1)
for i in range(N):
    if dp[An[i]] != 0:
        dp[An[i]] = 2
        continue
    for j in range(1, max_n//An[i] + 1):
        dp[An[i]*j] += 1
ans = 0
for a in An:
    if dp[a] == 1:
        ans += 1
print(ans)

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

N = int(input())
An = list(map(int, input().split()))
ok = [False] * N
ng = set()
a_An = np.array(An)
for i, a in enumerate(An):
    temp = a_An / a
    temp[i] = 0.1
    check = (temp % 1 == 0)
    ok = ok | check
    # print(ok)
    # check = np.delete(check, np.where(check == i))
    # check = check[check != i]
    # if len(check) > 0:
    #     ng = ng | set(check)
ok = list(ok)
print(ok.count(0))


Fixed submission:
N = int(input())
An = list(map(int, input().split()))
An.sort()
max_n = max(An)
dp = [0] * (max_n + 1)
for i in range(N):
    if dp[An[i]] != 0:
        dp[An[i]] = 2
        continue
    for j in range(1, max_n//An[i] + 1):
        dp[An[i]*j] += 1
ans = 0
for a in An:
    if dp[a] == 1:
        ans += 1
print(ans)

Buggy python submission (verdict: Runtime Error):
import numpy as np
from numba import njit
@njit
def main():
    N = int(input())
    An = list(map(int, input().split()))
    ans = 0
    ng = set()
    a_An = np.array(An)
    for i, a in enumerate(An):
        temp = a_An / a
        temp[i] = 0.1
        check = np.where(temp % 1 == 0)
        check = check[0]
        # check = np.delete(check, np.where(check == i))
        # check = check[check != i]
        if len(check) > 0:
            ng = ng | set(check)
    print(N-len(ng))

if __name__ == "__main__":
    main()

Fixed submission:
N = int(input())
An = list(map(int, input().split()))
An.sort()
max_n = max(An)
dp = [0] * (max_n + 1)
for i in range(N):
    if dp[An[i]] != 0:
        dp[An[i]] = 2
        continue
    for j in range(1, max_n//An[i] + 1):
        dp[An[i]*j] += 1
ans = 0
for a in An:
    if dp[a] == 1:
        ans += 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N = int(input())
An = list(map(int, input().split()))
ans = 0
ng = set()
a_An = np.array(An)
for i, a in enumerate(An):
    temp = a_An / a
    temp[i] = 0.1
    check = np.where(temp % 1 == 0)
    check = check[0]
    # check = np.delete(check, np.where(check == i))
    # check = check[check != i]
    if len(check) > 0:
        ng = ng | set(check)
print(N-len(ng))



Fixed submission:
N = int(input())
An = list(map(int, input().split()))
An.sort()
max_n = max(An)
dp = [0] * (max_n + 1)
for i in range(N):
    if dp[An[i]] != 0:
        dp[An[i]] = 2
        continue
    for j in range(1, max_n//An[i] + 1):
        dp[An[i]*j] += 1
ans = 0
for a in An:
    if dp[a] == 1:
        ans += 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N = int(input())
An = list(map(int, input().split()))
ans = 0
ng = set()
a_An = np.array(An)
for i, a in enumerate(An):
    temp = a_An / a
    temp[i] = 0.1
    check = np.where(temp % 1 == 0)
    check = np.delete(check, np.where(check == i))
    # check = check[check != i]
    if len(check) > 0:
        ng = ng | set(check)
print(N-len(ng))


Fixed submission:
N = int(input())
An = list(map(int, input().split()))
An.sort()
max_n = max(An)
dp = [0] * (max_n + 1)
for i in range(N):
    if dp[An[i]] != 0:
        dp[An[i]] = 2
        continue
    for j in range(1, max_n//An[i] + 1):
        dp[An[i]*j] += 1
ans = 0
for a in An:
    if dp[a] == 1:
        ans += 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N = int(input())
An = list(map(int, input().split()))
ans = 0
ng = set()
a_An = np.array(An)
for i, a in enumerate(An):
    temp = a_An / a
    check = np.where(temp%1 == 0)
    check = np.delete(check, np.where(check==i))
    check = check[check != i]
    if len(check) > 0:
        ng = ng | set(check)
print(N-len(ng))



Fixed submission:
N = int(input())
An = list(map(int, input().split()))
An.sort()
max_n = max(An)
dp = [0] * (max_n + 1)
for i in range(N):
    if dp[An[i]] != 0:
        dp[An[i]] = 2
        continue
    for j in range(1, max_n//An[i] + 1):
        dp[An[i]*j] += 1
ans = 0
for a in An:
    if dp[a] == 1:
        ans += 1
print(ans)