logo AlgoBeat OnlineJudge
登录 注册

#217539. [ICPC 2018 Nanjing R] Prime Game

内存限制:512 MiB 时间限制:1000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

Given a sequence of integers .

Let and be the number of distinct prime factors of .

Please calculate

输入格式

The first line contains one integer () the length of the sequence.

The second line contains integers () the sequence.

输出格式

Print the answer to the equation.

样例

样例输入 1

10
99 62 10 47 53 9 83 33 15 24

样例输出 1

248

样例输入 2

10
6 7 5 5 4 9 9 1 8 12

样例输出 2

134