Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
n = int(input())
a = list(map(int, input().split()))
c = Counter(a)
dp = [True] * (10 ** 6 + 1)
s = list(set(a))
for x in s:
    e = x * 2
    while e <= 10 ** 6:
        dp[e] = False
        e += x
ret = 0
for x in a:
    if c[x] == 1 and dp[x] == True:
        ret += 1
print(ret)


Fixed submission:
from collections import Counter
n = int(input())
a = list(map(int, input().split()))
c = Counter(a)
dp = [True] * (10 ** 6 + 1)
s = list(set(a))
for x in s:
    e = x * 2
    while e <= 10 ** 6:
        dp[e] = False
        e += x
ret = 0
for x in a:
    if c[x] == 1 and dp[x] == True:
        ret += 1
print(ret)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
n = int(input())
a = list(map(int, input().split()))
c = Counter(a)
dp = [True] * (10 ** 6 + 1)
s = list(set(a))
for x in s:
    e = x * 2
    # エラトステネスの篩
    while e <= 10 ** 6:
        dp[e] = False
        e += x
ret = 0
for x in a:
    # 重複なし and 約数なし 
    if c[x] == 1 and dp[x] == True:
        ret += 1
print(ret)


Fixed submission:
from collections import Counter
n = int(input())
a = list(map(int, input().split()))
c = Counter(a)
dp = [True] * (10 ** 6 + 1)
s = list(set(a))
for x in s:
    e = x * 2
    while e <= 10 ** 6:
        dp[e] = False
        e += x
ret = 0
for x in a:
    if c[x] == 1 and dp[x] == True:
        ret += 1
print(ret)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
n = int(input())
a = list(map(int, input().split()))
c = Counter(a)
dp = [True] * (10 ** 6 + 1)
s = list(set(a))
for x in s:
    e = x * 2
    # エラトステネスの篩
    while e <= 10 ** 6:
        dp[e] = False
        e += x
ret = 0
for x in a:
    # 重複なし and 約数なし
    if c[x] == 1 and dp[x] == True:
        ret += 1
print(ret)

Fixed submission:
from collections import Counter
n = int(input())
a = list(map(int, input().split()))
c = Counter(a)
dp = [True] * (10 ** 6 + 1)
s = list(set(a))
for x in s:
    e = x * 2
    while e <= 10 ** 6:
        dp[e] = False
        e += x
ret = 0
for x in a:
    if c[x] == 1 and dp[x] == True:
        ret += 1
print(ret)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
n = int(input())
a = list(map(int,input().split()))
c = Counter(a)
s = list(set(a))
dp = [True] * (10**6+1)
for x in s:
    e = x*2
    # エラトステネスの篩
    while e <= 10 ** 6:
        dp[e] = False
        e += x
ret = 0
for x in a:
    # 重複なし and 約数なし
    if c[x] == 1 and dp[x] == True:
        ret += 1
print(ret)

Fixed submission:
from collections import Counter
n = int(input())
a = list(map(int, input().split()))
c = Counter(a)
dp = [True] * (10 ** 6 + 1)
s = list(set(a))
for x in s:
    e = x * 2
    while e <= 10 ** 6:
        dp[e] = False
        e += x
ret = 0
for x in a:
    if c[x] == 1 and dp[x] == True:
        ret += 1
print(ret)

Buggy python submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
a = list(map(int, input().split()))
c = Counter(a)
dp = [True] * (10 ** 6 + 1)
s = list(set(a))
for x in s:
    e = x * 2
    while e <= 10 ** 6:
        dp[e] = False
        e += x
ret = 0
for x in a:
    if c[x] == 1 and dp[x] == True:
        ret += 1
print(ans)


Fixed submission:
from collections import Counter
n = int(input())
a = list(map(int, input().split()))
c = Counter(a)
dp = [True] * (10 ** 6 + 1)
s = list(set(a))
for x in s:
    e = x * 2
    while e <= 10 ** 6:
        dp[e] = False
        e += x
ret = 0
for x in a:
    if c[x] == 1 and dp[x] == True:
        ret += 1
print(ret)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
n = int(input())
a = list(map(int,input().split()))
c = Counter(a)
s = list (set(a))
dp = [True] * (10**6+1)

for x in s:
    e = x*2
    # エラトステネスの篩
    while e <= 10 ** 6:
        dp[e] = False
        e += x

ret = 0
for x in a:
    # 重複なし かつ 素数
    if c[x] == 1 and dp[x] == True:
        ret += 1
print(ret)

Fixed submission:
from collections import Counter
n = int(input())
a = list(map(int, input().split()))
c = Counter(a)
dp = [True] * (10 ** 6 + 1)
s = list(set(a))
for x in s:
    e = x * 2
    while e <= 10 ** 6:
        dp[e] = False
        e += x
ret = 0
for x in a:
    if c[x] == 1 and dp[x] == True:
        ret += 1
print(ret)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
n = int(input())
a = sorted(list(map(int,input().split())),reverse=True)
c = Counter(a)
s = list (set(a))
dp = [True] * (10**6+1)

for x in s:
    e = x*2
    # エラトステネスの篩
    while e <= 10 ** 6:
        dp[e] = False
        e += x

ret = 0
for x in a:
    # 重複なし かつ 素数
    if c[x] == 1 and dp[x] == True:
        ret += 1
print(ret)

Fixed submission:
from collections import Counter
n = int(input())
a = list(map(int, input().split()))
c = Counter(a)
dp = [True] * (10 ** 6 + 1)
s = list(set(a))
for x in s:
    e = x * 2
    while e <= 10 ** 6:
        dp[e] = False
        e += x
ret = 0
for x in a:
    if c[x] == 1 and dp[x] == True:
        ret += 1
print(ret)

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

Fixed submission:
from collections import Counter
n = int(input())
a = list(map(int, input().split()))
c = Counter(a)
dp = [True] * (10 ** 6 + 1)
s = list(set(a))
for x in s:
    e = x * 2
    while e <= 10 ** 6:
        dp[e] = False
        e += x
ret = 0
for x in a:
    if c[x] == 1 and dp[x] == True:
        ret += 1
print(ret)