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

N = int(input())
a_list = list(map(int, input().split()))

num_array = np.zeros(max(a_list), dtype=np.int8)
for a in a_list:
    num_array[a::a] += 1

count = 0
for a in a_list:
  if num_array[a] == 1:
    count += 1
print(count)

Fixed submission:
N = int(input())
a_list = sorted(list(map(int, input().split())))
a_max = a_list[-1]

count = [0] * (a_max+1)

for a in a_list:
  for j in range(a, a_max+1, a):
    count[j] += 1
  
ans = 0
for a in a_list:
  if count[a] == 1:
    ans += 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a_list = sorted(list(map(int, input().split())))
dp = [True] * N

for i, ai in enumerate(a_list):
  if dp[i] == False:
    continue
  
  for j, aj in enumerate(a_list[i+1:]):
    if ai == aj:
      dp[i] = False
    if aj%ai == 0:
      dp[i+1+j] = False
  if dp[i] > a_list[-1]**0.5+1:
    break
print(sum(dp))

Fixed submission:
N = int(input())
a_list = sorted(list(map(int, input().split())))
a_max = a_list[-1]

count = [0] * (a_max+1)

for a in a_list:
  for j in range(a, a_max+1, a):
    count[j] += 1
  
ans = 0
for a in a_list:
  if count[a] == 1:
    ans += 1
print(ans)

Buggy python submission (verdict: Runtime Error):
import numpy as np
 
N = int(input())
x_list = np.array(list(map(int, input().split()))).reshape(1,N)
count = np.sum(x_list%x_list.reshape(N,1)==0, axis=0)==1
print(np.sum(count))

Fixed submission:
N = int(input())
a_list = sorted(list(map(int, input().split())))
a_max = a_list[-1]

count = [0] * (a_max+1)

for a in a_list:
  for j in range(a, a_max+1, a):
    count[j] += 1
  
ans = 0
for a in a_list:
  if count[a] == 1:
    ans += 1
print(ans)

Buggy python submission (verdict: Runtime Error):
import numpy as np
 
N = int(input())
x_list = np.array(list(map(int, input().split()))).reshape(1,N)

print(np.sum(np.sum(x_list%x_list.reshape(N,1)==0, axis=0)==1))

Fixed submission:
N = int(input())
a_list = sorted(list(map(int, input().split())))
a_max = a_list[-1]

count = [0] * (a_max+1)

for a in a_list:
  for j in range(a, a_max+1, a):
    count[j] += 1
  
ans = 0
for a in a_list:
  if count[a] == 1:
    ans += 1
print(ans)

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

N = int(input())
x_list = np.repeat(list(map(int, input().split())), N).reshape(N,N)

print(np.sum(np.sum(x_list%x_list[:,0]==0, axis=1)==1))

Fixed submission:
N = int(input())
a_list = sorted(list(map(int, input().split())))
a_max = a_list[-1]

count = [0] * (a_max+1)

for a in a_list:
  for j in range(a, a_max+1, a):
    count[j] += 1
  
ans = 0
for a in a_list:
  if count[a] == 1:
    ans += 1
print(ans)

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

N = int(input())
x_list = np.repeat(list(map(int, input().split())), N).reshape(N,N)

print(np.sum(np.sum(x_list%x_list[:,0]==0, axis=1)==1))



Fixed submission:
N = int(input())
a_list = sorted(list(map(int, input().split())))
a_max = a_list[-1]

count = [0] * (a_max+1)

for a in a_list:
  for j in range(a, a_max+1, a):
    count[j] += 1
  
ans = 0
for a in a_list:
  if count[a] == 1:
    ans += 1
print(ans)

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

N = int(input())
x_list = np.array(list(map(int, input().split())))

count = 0
for xi in x_list:
  if np.sum(xi%x_list==0) == 1:
      count += 1
print(count)

Fixed submission:
N = int(input())
a_list = sorted(list(map(int, input().split())))
a_max = a_list[-1]

count = [0] * (a_max+1)

for a in a_list:
  for j in range(a, a_max+1, a):
    count[j] += 1
  
ans = 0
for a in a_list:
  if count[a] == 1:
    ans += 1
print(ans)

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

N = int(input())
x_list = np.array(list(map(int, input().split())), reverse=True)

count = 0
for xi in x_list:
  if np.sum(xi%x_list==0) == 1:
      count += 1
print(count)

Fixed submission:
N = int(input())
a_list = sorted(list(map(int, input().split())))
a_max = a_list[-1]

count = [0] * (a_max+1)

for a in a_list:
  for j in range(a, a_max+1, a):
    count[j] += 1
  
ans = 0
for a in a_list:
  if count[a] == 1:
    ans += 1
print(ans)

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

N = int(input())
x_list = np.array(sorted(list(map(int, input().split())), reverse=True))

count = 0
for i, xi in enumerate(x_list):
  if np.sum(xi%x_list==0) == 1:
      count += 1
print(count)

Fixed submission:
N = int(input())
a_list = sorted(list(map(int, input().split())))
a_max = a_list[-1]

count = [0] * (a_max+1)

for a in a_list:
  for j in range(a, a_max+1, a):
    count[j] += 1
  
ans = 0
for a in a_list:
  if count[a] == 1:
    ans += 1
print(ans)