Buggy python submission (verdict: Runtime Error):
_, *a = map(int, open("/Users/rikuo/Downloads/03-LargeRandom-23 (1)").read().split())
a.sort()
m = -~a[-1]
c = [0] * m
for i in a:
    c[i] += 1
    if c[i] > 1:
        continue
    for j in range(i * 2, m, i):
        c[j] = 2
print(sum(c[i]for i in a))

Fixed submission:
_,*a = map(int, open(0).read().split())
a.sort()
m = -~a[-1]
c = [0]*m
for i in a:
    c[i] += 1
    if c[i] > 1:
        continue
    for j in range(i * 2, m, i):
        c[j] = 2
print(sum(c[i]==1for i in a))

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
n,*a=map(int,open(0).read().split())
a.sort()
a=np.array(a)
i = 0
while len(a):
    try:
        if a[0] != a[1]:
            i+=1
    except:
      i+=1
    a = a[a%a[0] != 0]
print(i)

Fixed submission:
_,*a = map(int, open(0).read().split())
a.sort()
m = -~a[-1]
c = [0]*m
for i in a:
    c[i] += 1
    if c[i] > 1:
        continue
    for j in range(i * 2, m, i):
        c[j] = 2
print(sum(c[i]==1for i in a))

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
n,*a=map(int,open(0).read().split())
a=np.array(sorted(a))
i = 0
while len(a):
    try:
        if a[0] != a[1]:
            i+=1
    except:
      i+=1
    a = a[a%a[0] != 0]
print(i)

Fixed submission:
_,*a = map(int, open(0).read().split())
a.sort()
m = -~a[-1]
c = [0]*m
for i in a:
    c[i] += 1
    if c[i] > 1:
        continue
    for j in range(i * 2, m, i):
        c[j] = 2
print(sum(c[i]==1for i in a))

Buggy python submission (verdict: Runtime Error):
import numpy as np
n,*a=map(int,open(0).read().split())
a=np.array(sorted(a))
i = 0
while len(a):
    if a[0] != a[1]:
        i+=1
    a = a[a%a[0] != 0]
print(i)

Fixed submission:
_,*a = map(int, open(0).read().split())
a.sort()
m = -~a[-1]
c = [0]*m
for i in a:
    c[i] += 1
    if c[i] > 1:
        continue
    for j in range(i * 2, m, i):
        c[j] = 2
print(sum(c[i]==1for i in a))

Buggy python submission (verdict: Time Limit Exceeded):
n,*a=map(int,open(0).read().split())
a.sort()
i = 0
while a:
    if a.count(a[0]) == 1:
        i+=1
    a = list(filter(lambda x: x%a[0] >0,a))
print(i)

Fixed submission:
_,*a = map(int, open(0).read().split())
a.sort()
m = -~a[-1]
c = [0]*m
for i in a:
    c[i] += 1
    if c[i] > 1:
        continue
    for j in range(i * 2, m, i):
        c[j] = 2
print(sum(c[i]==1for i in a))

Buggy python submission (verdict: Runtime Error):
n,*a=map(int,open(0).read().split())
i = 0
while a:
    if a.count(a[0]) == 1:
        i+=1
    a = list(filter(lambda x: x%a[i] >0,a))
print(i)

Fixed submission:
_,*a = map(int, open(0).read().split())
a.sort()
m = -~a[-1]
c = [0]*m
for i in a:
    c[i] += 1
    if c[i] > 1:
        continue
    for j in range(i * 2, m, i):
        c[j] = 2
print(sum(c[i]==1for i in a))

Buggy python submission (verdict: Time Limit Exceeded):
n,*a=map(int,open(0).read().split())
a.sort()
i = 0
while a:
    if a.count(a[0]) == 1:
        i+=1
    a = list(filter(lambda x: x%a[0] >0,a))
print(i)

Fixed submission:
_,*a = map(int, open(0).read().split())
a.sort()
m = -~a[-1]
c = [0]*m
for i in a:
    c[i] += 1
    if c[i] > 1:
        continue
    for j in range(i * 2, m, i):
        c[j] = 2
print(sum(c[i]==1for i in a))

Buggy python submission (verdict: Time Limit Exceeded):
n,*a=map(int,open(0).read().split())
a.sort()
i = 0
while a:
    if a.count(a[0]) == 1:
        i+=1
    a = list(filter(lambda x: x%a[0] >0,a))
print(i)

Fixed submission:
_,*a = map(int, open(0).read().split())
a.sort()
m = -~a[-1]
c = [0]*m
for i in a:
    c[i] += 1
    if c[i] > 1:
        continue
    for j in range(i * 2, m, i):
        c[j] = 2
print(sum(c[i]==1for i in a))

Buggy python submission (verdict: Runtime Error):
n,*a=map(int,open(0).read().split())
a.sort()
i = 0
while a:
    if a.count(a[0]) == 1:
        i+=1
    a = list(filter(lambda x: x%a[i] >0,a))
print(i)

Fixed submission:
_,*a = map(int, open(0).read().split())
a.sort()
m = -~a[-1]
c = [0]*m
for i in a:
    c[i] += 1
    if c[i] > 1:
        continue
    for j in range(i * 2, m, i):
        c[j] = 2
print(sum(c[i]==1for i in a))

Buggy python submission (verdict: Time Limit Exceeded):
n,*a=map(int,open(0).read().split())
a.sort()
i = 0
while i<len(a):
    a = [a[i]]*(a.count(a[i])==1) + list(filter(lambda x: x%a[i] >0,a)) 
    i+=1
print(len(a))

Fixed submission:
_,*a = map(int, open(0).read().split())
a.sort()
m = -~a[-1]
c = [0]*m
for i in a:
    c[i] += 1
    if c[i] > 1:
        continue
    for j in range(i * 2, m, i):
        c[j] = 2
print(sum(c[i]==1for i in a))

Buggy python submission (verdict: Time Limit Exceeded):
n,*a=map(int,open(0).read().split())
a.sort()
i = 0
while i<len(a):
    a = [a[i]]*(a.count(a[i])==1) + list(filter(lambda x: x%a[i] >0,a)) 
    i+=1
print(len(a))

Fixed submission:
_,*a = map(int, open(0).read().split())
a.sort()
m = -~a[-1]
c = [0]*m
for i in a:
    c[i] += 1
    if c[i] > 1:
        continue
    for j in range(i * 2, m, i):
        c[j] = 2
print(sum(c[i]==1for i in a))

Buggy python submission (verdict: Time Limit Exceeded):
n,*a=map(int,open(0).read().split())
a.sort()
for j in a:
    a = list(filter(lambda x: x%j >0,a)) + [j]*(a.count(j)==1)
print(len(a))

Fixed submission:
_,*a = map(int, open(0).read().split())
a.sort()
m = -~a[-1]
c = [0]*m
for i in a:
    c[i] += 1
    if c[i] > 1:
        continue
    for j in range(i * 2, m, i):
        c[j] = 2
print(sum(c[i]==1for i in a))