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

counter = [0 for _ in range(n)]
for num in a:
    div = np.array(a) % num
    for j, index in enumerate(div):
        if index == 0:
            counter[j] += 1
print(counter.count(1))

Fixed submission:
import numpy as np
 
n = int(input())
a = list(map(int, input().split()))
a.sort()
dp = [0 for _ in range(a[-1] + 1)]

for x in a:
    for j in range(x, a[-1] + 1, x):
        dp[j] += 1
ans = 0
for x in set(a):
    #print(x)
    if dp[x] == 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()))
counter = set([])
for i in range(n - 1):
    a_np = np.roll(np.array(a), i + 1)
    counter = counter | set(np.where(a % a_np == 0)[0])
print(n - len(counter))

Fixed submission:
import numpy as np
 
n = int(input())
a = list(map(int, input().split()))
a.sort()
dp = [0 for _ in range(a[-1] + 1)]

for x in a:
    for j in range(x, a[-1] + 1, x):
        dp[j] += 1
ans = 0
for x in set(a):
    #print(x)
    if dp[x] == 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()))
counter = set([])
for i in range(n - 1):
    a_np = np.roll(np.array(a), i + 1)
    index = np.where(a % a_np == 0)
    counter = counter | set(index[0])
print(n - len(counter))

Fixed submission:
import numpy as np
 
n = int(input())
a = list(map(int, input().split()))
a.sort()
dp = [0 for _ in range(a[-1] + 1)]

for x in a:
    for j in range(x, a[-1] + 1, x):
        dp[j] += 1
ans = 0
for x in set(a):
    #print(x)
    if dp[x] == 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()))
counter = set([])
for i in range(n - 1):
    a_np = np.roll(np.array(a), i + 1)
    index = np.where(a % a_np == 0)
    for num in index[0]:
        counter.add(num)
print(n - len(counter))

Fixed submission:
import numpy as np
 
n = int(input())
a = list(map(int, input().split()))
a.sort()
dp = [0 for _ in range(a[-1] + 1)]

for x in a:
    for j in range(x, a[-1] + 1, x):
        dp[j] += 1
ans = 0
for x in set(a):
    #print(x)
    if dp[x] == 1:
        ans += 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
counter = [0 for _ in range(n)]
for i in range(n):
    for j in range(n):
        if i == j:
            continue
        else:
            if counter[i] > 0:
                continue
            else:
                if a[i] % a[j] == 0:
                    counter[i] += 1
print(counter.count(0))

Fixed submission:
import numpy as np
 
n = int(input())
a = list(map(int, input().split()))
a.sort()
dp = [0 for _ in range(a[-1] + 1)]

for x in a:
    for j in range(x, a[-1] + 1, x):
        dp[j] += 1
ans = 0
for x in set(a):
    #print(x)
    if dp[x] == 1:
        ans += 1
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
counter = [0 for _ in range(n)]
for i in range(n):
    for j in range(n):
        if i == j:
            continue
        else:
            if counter[i] > 0:
                continue
            else:
                if a[i] % a[j] == 0:
                    counter[i] += 1:
print(counter.count(0))

Fixed submission:
import numpy as np
 
n = int(input())
a = list(map(int, input().split()))
a.sort()
dp = [0 for _ in range(a[-1] + 1)]

for x in a:
    for j in range(x, a[-1] + 1, x):
        dp[j] += 1
ans = 0
for x in set(a):
    #print(x)
    if dp[x] == 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()))
counter = [0 for _ in range(n)]
for i in range(n - 1):
    a_np = np.roll(np.array(a), i + 1)
    index = list(np.where(a % a_np == 0))
    for n in index[0]:
        counter[int(n)] += 1
print(counter.count(0))

Fixed submission:
import numpy as np
 
n = int(input())
a = list(map(int, input().split()))
a.sort()
dp = [0 for _ in range(a[-1] + 1)]

for x in a:
    for j in range(x, a[-1] + 1, x):
        dp[j] += 1
ans = 0
for x in set(a):
    #print(x)
    if dp[x] == 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()))
a_np = np.array(a)
a_np = np.roll(a_np, 1)
counter = [0 for _ in range(n)]
for i in range(n - 1):
    index = list(np.where(a % a_np == 0))
    for n in index[0]:
        counter[int(n)] += 1
    a_np = np.roll(a_np, 1)
print(counter.count(0))

Fixed submission:
import numpy as np
 
n = int(input())
a = list(map(int, input().split()))
a.sort()
dp = [0 for _ in range(a[-1] + 1)]

for x in a:
    for j in range(x, a[-1] + 1, x):
        dp[j] += 1
ans = 0
for x in set(a):
    #print(x)
    if dp[x] == 1:
        ans += 1
print(ans)