Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter


def solve(string):
    n, *a = map(int, string.split())
    table = [True] * (10**6 + 1)
    for _a in a:
        if table[_a]:
            for i in range(2 * _a, max(a) + 1, _a):
                table[i] = False
    return str(sum(table[k] for k, v in Counter(a).items() if v == 1))


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))


Fixed submission:
import numpy as np
from collections import Counter


def solve(string):
    n, *a = map(int, string.split())
    table = np.array([True] * (10**6 + 1))
    for _a in a:
        if table[_a]:
            table[2*_a::_a]=False
    i = np.array([k for k,v in Counter(a).items() if v==1],dtype=np.int)
    return str(table[i].sum())


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter


def solve(string):
    n, *a = map(int, string.split())
    table = [True] * (10**6 + 1)
    a = sorted(a)
    for _a in a:
        if table[_a]:
            for i in range(2 * _a, 10**6 + 1, _a):
                table[i] = False
    return str(sum(table[k] for k, v in Counter(a).items() if v == 1))


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))


Fixed submission:
import numpy as np
from collections import Counter


def solve(string):
    n, *a = map(int, string.split())
    table = np.array([True] * (10**6 + 1))
    for _a in a:
        if table[_a]:
            table[2*_a::_a]=False
    i = np.array([k for k,v in Counter(a).items() if v==1],dtype=np.int)
    return str(table[i].sum())


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter


def solve(string):
    n, *a = map(int, string.split())
    table = [True] * (10**6 + 1)
    for _a in a:
        if table[_a]:
            for i in range(2 * _a, 10**6 + 1, _a):
                table[i] = False
    return str(sum(table[k] for k, v in Counter(a).items() if v == 1))


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))


Fixed submission:
import numpy as np
from collections import Counter


def solve(string):
    n, *a = map(int, string.split())
    table = np.array([True] * (10**6 + 1))
    for _a in a:
        if table[_a]:
            table[2*_a::_a]=False
    i = np.array([k for k,v in Counter(a).items() if v==1],dtype=np.int)
    return str(table[i].sum())


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np


def solve(string):
    n, *a = map(int, string.split())
    if len(a) == 1:
        return "1"
    a = np.array(a, np.int)
    ans = np.ones(n, np.int)
    for i, _a in enumerate(a):
        tmp = a % _a != 0
        tmp[i] = True
        ans *= tmp
    return str(sum(ans))


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))


Fixed submission:
import numpy as np
from collections import Counter


def solve(string):
    n, *a = map(int, string.split())
    table = np.array([True] * (10**6 + 1))
    for _a in a:
        if table[_a]:
            table[2*_a::_a]=False
    i = np.array([k for k,v in Counter(a).items() if v==1],dtype=np.int)
    return str(table[i].sum())


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

Buggy python submission (verdict: Time Limit Exceeded):
from itertools import product


def solve(string):
    n, *a = map(int, string.split())
    a = sorted(a)
    if len(a) == 1:
        return "1"
    t = [True] * n
    for i, j in product(range(n), repeat=2):
        if i == j:
            continue
        if a[i] % a[j] == 0:
            t[i]=False
    return str(sum(t))


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))


Fixed submission:
import numpy as np
from collections import Counter


def solve(string):
    n, *a = map(int, string.split())
    table = np.array([True] * (10**6 + 1))
    for _a in a:
        if table[_a]:
            table[2*_a::_a]=False
    i = np.array([k for k,v in Counter(a).items() if v==1],dtype=np.int)
    return str(table[i].sum())


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

Buggy python submission (verdict: Runtime Error):
def solve(string):
    n, *a = map(int, string.split())
    a = sorted(a)
    ans = [a[0]]
    for _a in a[1:]:
        for b in ans:
            if _a % b == 0:
                break
        else:
            ans.append(_a)
    return str(len(ans) - (a[0] == a[1]))


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))


Fixed submission:
import numpy as np
from collections import Counter


def solve(string):
    n, *a = map(int, string.split())
    table = np.array([True] * (10**6 + 1))
    for _a in a:
        if table[_a]:
            table[2*_a::_a]=False
    i = np.array([k for k,v in Counter(a).items() if v==1],dtype=np.int)
    return str(table[i].sum())


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))