Limits 500ms, 512 MB

Broly is the legendary warrior who loves his planet and always prepares himself to protect the planet from his enemies. Frieza is the warrior from another planet who is the enemy of Broly. To take the control of Broly’s planet, Frieza sends his Army to fight with Broly.

The fighters are numbered from 11 to NN and each fighter comes sequentially one after another to fight with Broly. The ithi^{th} fighter have ii amount of strength. After destroying ithi^{th} fighter Broly gains i3i^{3} of respect, and initially, Broly doesn’t have any respect. After completing the fight, Broly needs to report to his master how much respect he earned after destroying NN number of fighters and the total strength of Frieza’s Army. During the fight, he was able to calculate his respect after destroying each fighter but somehow he forgot that for which fighter jj, he earned total XX respect.

Formally, if Broly destroys a total of 99 fighters and his master asks him after destroying which fighter Broly gains 3636 respect then the answer will be 33 because after destroying the 3rd3^{rd} fighter Broly gains a total of 3636 respect.

There were a total of j2j^{2} fighters in the Frieza's Army. Now, your task is to find out the total strength of the Frieza’s Army.

Input

Each test contains multiple test cases. The first line contains tt (1t10001 \leq t \leq 1000), the number of test cases.

The only line of each test case will contain an integer XX (1X1061 \leq X \leq 10^6) — The respect earned by Broly after destroying jthj^{th} fighter.

Output

For each test case, output the total strength of the Frieza’s Army.

Sample

InputOutput
5
441
2025
225
36
100
666
3321
325
45
136

Submit

Login to submit.

Statistics

90% Solution Ratio
Being_GoromEarliest, Jun '21
ADRI0777Fastest, 0.0s
Being_GoromLightest, 131 kB
Being_GoromShortest, 232B
Toph uses cookies. By continuing you agree to our Cookie Policy.