时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld
题目描述
Let
)
be the minimum divisor greater than 1 of n. Bobo construsts a tree on all positive integer numbers

by adding edges between n and
%7D)
for all n > 1.
Let
)
be the number of edges between vertices u and v on the tree. Given m and

, Bobo would like to find
)
.
输入描述:
The input consists of several test cases terminated by end-of-file.
The first line of each test case contains an integer m.
The second line contains m integers
.
* 
* 
* The sum of m does not exceed
.
输出描述:
For each test case, print an integer which denote the result.
示例1
输入
复制
3
1 1 1
4
3 1 2 4
4
0 0 0 0