Buggy python submission (verdict: Runtime Error):
import sys
def input(): return sys.stdin.readline()

n=int(input())
A=list(map(int,input().split()))
cnt=[0]*(10**6)
ans=0
for a in A:
  if cnt[a]!=0:
    cnt[a]=2
    continue
  x=a
  while x<10**6:
    cnt[x]+=1
    x+=a
for a in A:
  if cnt[a]==1:
    ans+=1
print(ans)


Fixed submission:
import sys
def input(): return sys.stdin.readline()

n=int(input())
A=list(map(int,input().split()))
cnt=[0]*(10**6+2)
ans=0
for a in A:
  if cnt[a]!=0:
    cnt[a]=2
    continue
  x=a
  while x<10**6+2:
    cnt[x]+=1
    x+=a
for a in A:
  #print(cnt[a])
  if cnt[a]==1:
    ans+=1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
import sys
def input(): return sys.stdin.readline()

def main():
  n=int(input())
  a=np.array(list(map(int,input().split())))
  
  ans=0
  #print(a%(np.array([a for _ in range(n)])).transpose())
  
  for A in a:
    b=A%a==0
    #print(b)
    if np.count_nonzero(b)==1:
      ans+=1
  print(ans)

if __name__ == "__main__":
    main()


Fixed submission:
import sys
def input(): return sys.stdin.readline()

n=int(input())
A=list(map(int,input().split()))
cnt=[0]*(10**6+2)
ans=0
for a in A:
  if cnt[a]!=0:
    cnt[a]=2
    continue
  x=a
  while x<10**6+2:
    cnt[x]+=1
    x+=a
for a in A:
  #print(cnt[a])
  if cnt[a]==1:
    ans+=1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
import sys
def input(): return sys.stdin.readline()

n=int(input())
a=np.array(list(map(int,input().split())))
 
ans=0
#print(a%(np.array([a for _ in range(n)])).transpose())
 
for A in a:
  b=A%a==0
  #print(b)
  if np.count_nonzero(b)==1:
    ans+=1
print(ans)


Fixed submission:
import sys
def input(): return sys.stdin.readline()

n=int(input())
A=list(map(int,input().split()))
cnt=[0]*(10**6+2)
ans=0
for a in A:
  if cnt[a]!=0:
    cnt[a]=2
    continue
  x=a
  while x<10**6+2:
    cnt[x]+=1
    x+=a
for a in A:
  #print(cnt[a])
  if cnt[a]==1:
    ans+=1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
import sys
def input(): return sys.stdin.readline()

n=int(input())
a=np.array(list(map(int,input().split())))
 
ans=0
#print(a%(np.array([a for _ in range(n)])).transpose())
 
for i in range(n):
  b=a[i]%a==0
  #print(b)
  if np.count_nonzero(b)==1:
    ans+=1
print(ans)


Fixed submission:
import sys
def input(): return sys.stdin.readline()

n=int(input())
A=list(map(int,input().split()))
cnt=[0]*(10**6+2)
ans=0
for a in A:
  if cnt[a]!=0:
    cnt[a]=2
    continue
  x=a
  while x<10**6+2:
    cnt[x]+=1
    x+=a
for a in A:
  #print(cnt[a])
  if cnt[a]==1:
    ans+=1
print(ans)

Buggy python submission (verdict: Runtime Error):
import numpy as np

n=int(input())
a=np.array(list(map(int,input().split())))

ans=0
#print(a%(np.array([a for _ in range(n)])).transpose()==0)
b=(np.array([a for _ in range(n)])).transpose()%a==0

for i in range(n):
  #b=a[i]%a==0
  #print(b[i])
  #print(np.count_nonzero(b[i]))
  if np.count_nonzero(b[i])==1:
    ans+=1
print(ans)


Fixed submission:
import sys
def input(): return sys.stdin.readline()

n=int(input())
A=list(map(int,input().split()))
cnt=[0]*(10**6+2)
ans=0
for a in A:
  if cnt[a]!=0:
    cnt[a]=2
    continue
  x=a
  while x<10**6+2:
    cnt[x]+=1
    x+=a
for a in A:
  #print(cnt[a])
  if cnt[a]==1:
    ans+=1
print(ans)

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

n=int(input())
a=np.array(list(map(int,input().split())))

ans=0
#print(a%(np.array([a for _ in range(n)])).transpose())

for i in range(n):
  b=a[i]%a==0
  #print(b)
  if np.count_nonzero(b)==1:
    ans+=1
print(ans)


Fixed submission:
import sys
def input(): return sys.stdin.readline()

n=int(input())
A=list(map(int,input().split()))
cnt=[0]*(10**6+2)
ans=0
for a in A:
  if cnt[a]!=0:
    cnt[a]=2
    continue
  x=a
  while x<10**6+2:
    cnt[x]+=1
    x+=a
for a in A:
  #print(cnt[a])
  if cnt[a]==1:
    ans+=1
print(ans)

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

n=int(input())
a=np.array(list(map(int,input().split())))
#print(a)

ans=0
for i in range(n):
  b=a[i]%a
  #print(b)
  #print(b==0)
  if np.count_nonzero(b==0)==1:
    ans+=1
print(ans)


Fixed submission:
import sys
def input(): return sys.stdin.readline()

n=int(input())
A=list(map(int,input().split()))
cnt=[0]*(10**6+2)
ans=0
for a in A:
  if cnt[a]!=0:
    cnt[a]=2
    continue
  x=a
  while x<10**6+2:
    cnt[x]+=1
    x+=a
for a in A:
  #print(cnt[a])
  if cnt[a]==1:
    ans+=1
print(ans)

Buggy python submission (verdict: Runtime Error):
import numpy as np

n=int(input())
a=np.array(list(map(int,input().split())))
#print(a)

ans=0
for i in range(n):
  b=a[i]%a
  #print(b)
  #print(b==0)
  if np.count_nonzero(b==0)==1:
    ans+=1
print(ans)


Fixed submission:
import sys
def input(): return sys.stdin.readline()

n=int(input())
A=list(map(int,input().split()))
cnt=[0]*(10**6+2)
ans=0
for a in A:
  if cnt[a]!=0:
    cnt[a]=2
    continue
  x=a
  while x<10**6+2:
    cnt[x]+=1
    x+=a
for a in A:
  #print(cnt[a])
  if cnt[a]==1:
    ans+=1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))

ans=0
for i in range(n):
  if all([i==j or a[i]%a[j]!=0 for j in range(n)]):
    ans+=1
print(ans)


Fixed submission:
import sys
def input(): return sys.stdin.readline()

n=int(input())
A=list(map(int,input().split()))
cnt=[0]*(10**6+2)
ans=0
for a in A:
  if cnt[a]!=0:
    cnt[a]=2
    continue
  x=a
  while x<10**6+2:
    cnt[x]+=1
    x+=a
for a in A:
  #print(cnt[a])
  if cnt[a]==1:
    ans+=1
print(ans)