AtCoder Beginner Contest 170
D
Not Divisible
AtCoder
⌀ 1033
原题
← CE →
翻译中…

Problem Statement

翻译中…

Given is a number sequence $A$ of length $N$.

翻译中…

Find the number of integers $i$ $\left(1 \leq i \leq N\right)$ with the following property:

翻译中…
  • For every integer $j$ $\left(1 \leq j \leq N\right)$ such that $i \neq j$, $A_j$ does not divide $A_i$.
翻译中…

Constraints

翻译中…
  • All values in input are integers.
  • $1 \leq N \leq 2 \times 10^5$
  • $1 \leq A_i \leq 10^6$
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

N
A_1 A_2 \cdots A_N

翻译中…

Output

翻译中…

Print the answer.

翻译中…

样例

Input #1
5
24 11 8 3 16
Output #1
3
The integers with the property are $2$, $3$, and $4$.
Input #2
4
5 5 5 5
Output #2
0
Note that there can be multiple equal numbers.
Input #3
10
33 18 45 28 8 19 89 86 2 4
Output #3
5
题目信息
题号
abc170_d
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。