Exclusive Multiplication
题号:NC237067
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Megumi is a girl who loves number theory. Today is her birthday, so Joseph creates a new function f(n) and gives it to her as a gift. The definition of f(n) is shown in the formula as follows.

where are prime factors of n and

Now Joseph gives you n integers and wants you to calculate the following formula.

输入描述:

The first line contains one integer .
The second line contains n integers .

输出描述:

Output one integer denoting the value of the formula you calculated.
示例1

输入

复制
4
1 2 3 2

输出

复制
20
示例2

输入

复制
5
5 6 2 3 8

输出

复制
86