Geography Class

View as PDF

Submit solution

Points: 5 (partial)
Time limit: 1.0s
Memory limit: 512M

Author:
Problem types

Tommy, feeling sleepy during geography class, decides to work on his math homework to help him stay awake. However, upon opening his homework, he is taken aback by the difficulty of the problems. Unable to solve them, he seeks your assistance and asks you to solve them for him.

Given N integers, a_1, a_2, \dots, a_N, his homework asks him to calculate the sum of the squares of the factors of each integer.

Constraints

SubtaskPointsNa_i
1201 \leq N \leq 3 \times 10^31 \leq a_i \leq 10^5
2801 \leq N \leq 10^61 \leq a_i \leq 10^5

Input Specification

The first line of input contains an integer, N.

The following N lines each contains an integer, a_i.

Output Specification

For each given number, output the sum of the squares of the factors of it.

Sample Input

2
3
5

Sample Output

10
26

Comments

There are no comments at the moment.