Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
b = max(a)
che,re = [1 for i in range(b)],[]
for i in a:
    if i in re:
        che[i-1] = 0
    else:
        re.append(i)
        c = b // i
        for j in range(2,c+1):
            che[i*j-1] = 0
ans = 0
for i in re:
    if che[i-1] == 1:
        ans += 1
print(ans)


Fixed submission:
n = int(input())
a = list(map(int, input().split()))
b = max(a)
che = [1 for i in range(b)]
for i in a:
    if che[i-1] == 1:
        c = b // i
        for j in range(2,c+1):
            che[i*j-1] = 0
        che[i-1] = 2
    elif che[i-1] == 2:
        che[i-1] = 0
ans = 0
for i in a:
    if che[i-1] == 2:
        ans += 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import heapq as hp
n = int(input())
a = list(map(int, input().split()))
han = list(map(lambda x:x*(-1), a))
hp.heapify(han)
b = hp.heappop(han)*(-1)
che,re = [1 for i in range(b)],[]
for i in a:
    if i in re:
        che[i-1] = 0
    else:
        re.append(i)
        c = b // i
        for j in range(2,c+1):
            che[i*j-1] = 0
ans = 0
for i in re:
    if che[i-1] == 1:
        ans += 1
print(ans)


Fixed submission:
n = int(input())
a = list(map(int, input().split()))
b = max(a)
che = [1 for i in range(b)]
for i in a:
    if che[i-1] == 1:
        c = b // i
        for j in range(2,c+1):
            che[i*j-1] = 0
        che[i-1] = 2
    elif che[i-1] == 2:
        che[i-1] = 0
ans = 0
for i in a:
    if che[i-1] == 2:
        ans += 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import heapq as hp
n = int(input())
a = list(map(int, input().split()))
han = list(map(lambda x:x*(-1), a))
hp.heapify(han)
b = hp.heappop(han)*(-1)
che,re = [0 for i in range(b)],[]
for i in a:
    che[i-1] = 1
for i in a:
    if i in re:
        che[i-1] = 0
    else:
        re.append(i)
        c = b // i
        for j in range(2,c+1):
            che[i*j-1] = 0
print(che.count(1))


Fixed submission:
n = int(input())
a = list(map(int, input().split()))
b = max(a)
che = [1 for i in range(b)]
for i in a:
    if che[i-1] == 1:
        c = b // i
        for j in range(2,c+1):
            che[i*j-1] = 0
        che[i-1] = 2
    elif che[i-1] == 2:
        che[i-1] = 0
ans = 0
for i in a:
    if che[i-1] == 2:
        ans += 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
b = max(a)
che,re = [0 for i in range(b)],[]
for i in a:
    che[i-1] = 1
for i in a:
    if i in re:
        che[i-1] = 0
    else:
        re.append(i)
        c = b // i
        for j in range(2,c+1):
            che[i*j-1] = 0
print(che.count(1))


Fixed submission:
n = int(input())
a = list(map(int, input().split()))
b = max(a)
che = [1 for i in range(b)]
for i in a:
    if che[i-1] == 1:
        c = b // i
        for j in range(2,c+1):
            che[i*j-1] = 0
        che[i-1] = 2
    elif che[i-1] == 2:
        che[i-1] = 0
ans = 0
for i in a:
    if che[i-1] == 2:
        ans += 1
print(ans)

Buggy python submission (verdict: Runtime Error):
import heapq as hp
n = int(input())
a = list(map(int, input().split()))
hp.heapify(a)
b = a[-1]
che,re = [0 for i in range(b)],[]
for i in a:
    che[i-1] = 1
for i in a:
    if i in re:
        che[i-1] = 0
    else:
        re.append(i)
        c = b // i
        for j in range(2,c+1):
            che[i*j-1] = 0
print(che.count(1))


Fixed submission:
n = int(input())
a = list(map(int, input().split()))
b = max(a)
che = [1 for i in range(b)]
for i in a:
    if che[i-1] == 1:
        c = b // i
        for j in range(2,c+1):
            che[i*j-1] = 0
        che[i-1] = 2
    elif che[i-1] == 2:
        che[i-1] = 0
ans = 0
for i in a:
    if che[i-1] == 2:
        ans += 1
print(ans)

Buggy python submission (verdict: Runtime Error):
import heapq as hp
n = int(input())
a = list(map(int, input().split()))
hp.heapify(a)
ans = 0
while len(a) > 0:
    b = hp[0]
    if b in a:
         ans += -1
    a = [i for i in a if i % b != 0]
    ans += 1
print(ans)


Fixed submission:
n = int(input())
a = list(map(int, input().split()))
b = max(a)
che = [1 for i in range(b)]
for i in a:
    if che[i-1] == 1:
        c = b // i
        for j in range(2,c+1):
            che[i*j-1] = 0
        che[i-1] = 2
    elif che[i-1] == 2:
        che[i-1] = 0
ans = 0
for i in a:
    if che[i-1] == 2:
        ans += 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import heapq as hp
n = int(input())
a = list(map(int, input().split()))
hp.heapify(a)
ans = 0
while len(a) > 0:
    b = hp.heappop(a)
    if b in a:
         ans += -1
    a = [i for i in a if i % b != 0]
    ans += 1
print(ans)


Fixed submission:
n = int(input())
a = list(map(int, input().split()))
b = max(a)
che = [1 for i in range(b)]
for i in a:
    if che[i-1] == 1:
        c = b // i
        for j in range(2,c+1):
            che[i*j-1] = 0
        che[i-1] = 2
    elif che[i-1] == 2:
        che[i-1] = 0
ans = 0
for i in a:
    if che[i-1] == 2:
        ans += 1
print(ans)