#P11770. 檐牙覆雪
檐牙覆雪
Description
Still in the familiar place: there are a total of window ledges, numbered from top to bottom, with the topmost being numbered and the bottommost being numbered . Tianyi notices that the snow accumulations on each ledge can be viewed as a multiset of snowballs, where initially, the first ledge holds a single snowball with a volume of , while the other ledges are devoid of any snow. Suddenly, a gust of wind laden with snow blows through, instigating transformations in the snow accumulations -
In the -th transformation, every snowball on the -th ledge is lifted up. Due to peculiar physical phenomena, all ledges whose numbers are multiples of (excluding itself) receive new snow accumulations. Specifically, let the volume of a lifted snowball be . Among these receiving ledges, the one with the largest number receives a snowball of volume , the second largest receives a snowball of volume , and so on. In the end, the lifted snowball mysteriously returns to the -th ledge, leaving the snow accumulation on the -th ledge unchanged after this transformation.
Ling knows that Tianyi is intrigued by the question: After the transformations, what is the total volume of the largest snowball on each ledge? As they sit peacefully admiring the snow, you are tasked with answering this question for them.
Input Format
The first line of the input contains an integer — the number of test cases.
The only line of each test case contains an intergers — the number of window ledges.
Output Format
For each test case, output a single integer — the total volume of the largest snowball on each ledge.
5
1
5
3
114514
2000000
1
18
6
18057023450
5575638612615
Hint
Sample Explanation
The final state when is as follows:
On the first ledge is a snowball with a volume of ;
On the second ledge is a snowball with a volume of ;
On the third ledge is a snowball with a volume of ;
On the fourth ledge are two snowballs with volumes of ;
On the fifth ledge is a snowball with a volume of ;
The total volume of the largest snowball on each ledge is .
Constrains
Subtasks applied. You can only gain the score of the subtask if you accepted all the tests in the subtask.
| Subtask ID | Score | ||
|---|---|---|---|
| 1 | |||
| 2 | |||
| 3 | |||
| 4 | |||
| 5 | |||
For all tests, it is guaranteed that ,.
京公网安备 11011102002149号