Buggy python submission (verdict: Runtime Error):
n = int(input())
L = list(map(int,input().split()))
dp = [0]*(2*(10**5)+1000)
for i in range(n):
    dp[L[i]] +=1

one = []
for i in range(len(dp)):
    if dp[i] == 1:
        one.append(i)

dp = [0]*(2*(10**5)+1000)
a = list(set(L))
for i in L:
    for j in range(2*i,(2*(10**5)+1000),i):
        if not dp[j-1]:
            dp[j-1] = 1

ans = 0
for i in one:
    if dp[i-1] == 0:
        ans +=1
print(ans)

Fixed submission:
n = int(input())
L = list(map(int,input().split()))
dp = [0]*((10**6)+1000)
for i in L:
    dp[i] +=1

one = []
for i in range(10**6+1000):
    if dp[i] == 1:
        one.append(i)

dp = [0]*((10**6)+1000)
a = list(set(L))
for i in a:
    for j in range(2*i,10**6+1000,i):
        dp[j] = 1

ans = 0
for i in one:
    if dp[i] == 0:
        ans +=1
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
L = list(map(int,input().split()))
dp = [0]*(2*(10**5)+1000)
for i in range(n):
    dp[L[i]] +=1

one = []
for i in range(len(dp)):
    if dp[i] == 1:
        one.append(i)

dp = [0]*(2*(10**5)+1000)
a = list(set(L))
for i in L:
    for j in range(2*i,max(L)+1,i):
        if not dp[j-1]:
            dp[j-1] = 1

ans = 0
for i in one:
    if dp[i-1] == 0:
        ans +=1
print(ans)

Fixed submission:
n = int(input())
L = list(map(int,input().split()))
dp = [0]*((10**6)+1000)
for i in L:
    dp[i] +=1

one = []
for i in range(10**6+1000):
    if dp[i] == 1:
        one.append(i)

dp = [0]*((10**6)+1000)
a = list(set(L))
for i in a:
    for j in range(2*i,10**6+1000,i):
        dp[j] = 1

ans = 0
for i in one:
    if dp[i] == 0:
        ans +=1
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
L = list(map(int,input().split()))

dp = [0]*(2*(10**5)+1000)
one = list(set(L))
for i in L:
    for j in range(2*i,max(L)+1,i):
        if not dp[j-1]:
            dp[j-1] = 1

ans = 0
for i in one:
    if dp[i-1] == 0:
        ans +=1
print(ans)

Fixed submission:
n = int(input())
L = list(map(int,input().split()))
dp = [0]*((10**6)+1000)
for i in L:
    dp[i] +=1

one = []
for i in range(10**6+1000):
    if dp[i] == 1:
        one.append(i)

dp = [0]*((10**6)+1000)
a = list(set(L))
for i in a:
    for j in range(2*i,10**6+1000,i):
        dp[j] = 1

ans = 0
for i in one:
    if dp[i] == 0:
        ans +=1
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
L = list(map(int,input().split()))

dp = [0]*(2*(10**5)+1000)
one = []
for i in range(n):
    if L.count(L[i]) == 1:
        one.append(L[i])

for i in L:
    for j in range(2*i,max(L)+1,i):
        if not dp[j-1]:
            dp[j-1] = 1

ans = 0
for i in one:
    if dp[i-1] == 0:
        ans +=1
print(ans)


Fixed submission:
n = int(input())
L = list(map(int,input().split()))
dp = [0]*((10**6)+1000)
for i in L:
    dp[i] +=1

one = []
for i in range(10**6+1000):
    if dp[i] == 1:
        one.append(i)

dp = [0]*((10**6)+1000)
a = list(set(L))
for i in a:
    for j in range(2*i,10**6+1000,i):
        dp[j] = 1

ans = 0
for i in one:
    if dp[i] == 0:
        ans +=1
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
L = list(map(int,input().split()))

dp = [0]*(2*(10**5)+1000)
one = []
for i in range(n):
    if L.count(L[i]) == 1:
        one.append(L[i])

for i in L:
    for j in range(2*i,max(L)+1,i):
        if not dp[j-1]:
            dp[j-1] = 1

ans = 0
for i in one:
    if dp[i-1] == 0:
        ans +=1
print(ans)


Fixed submission:
n = int(input())
L = list(map(int,input().split()))
dp = [0]*((10**6)+1000)
for i in L:
    dp[i] +=1

one = []
for i in range(10**6+1000):
    if dp[i] == 1:
        one.append(i)

dp = [0]*((10**6)+1000)
a = list(set(L))
for i in a:
    for j in range(2*i,10**6+1000,i):
        dp[j] = 1

ans = 0
for i in one:
    if dp[i] == 0:
        ans +=1
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
L = list(map(int,input().split()))
L = list(set(L))
l = len(L)
if l == 1:
    print(0)
    exit()
L.sort()
#print(L)
dp = [0]*(L[-1]*2+1)

for i in range(l):
    j = 1
    while L[i]*(j+1) <= len(dp):
        if not dp[L[i]*(j+1)]:
            dp[L[i]*(j+1)] = 1
        j +=1
#print(dp)
cnt = 0
for i in range(l):
    if dp[L[i]] == 0:
        cnt +=1
print(cnt)

Fixed submission:
n = int(input())
L = list(map(int,input().split()))
dp = [0]*((10**6)+1000)
for i in L:
    dp[i] +=1

one = []
for i in range(10**6+1000):
    if dp[i] == 1:
        one.append(i)

dp = [0]*((10**6)+1000)
a = list(set(L))
for i in a:
    for j in range(2*i,10**6+1000,i):
        dp[j] = 1

ans = 0
for i in one:
    if dp[i] == 0:
        ans +=1
print(ans)