TRICOUNT  Counting Triangles
We define the LEVEL of a triangle as in the following illustrative image:
Task: Your task is very easy. All you have to do is to count all triangles in the biggest one (Level N).
Input
The first line of the input contains an integer T (T ≤ 10000)  the number of test cases and T lines follow. Each line contains an integer N (1 ≤ N ≤ 10^{6}) which is the level of the triangle in that test case.
Output
For each test case, you should write a seperate line: the number of triangles in the biggest one (Level N). (All answers will fit within the range of a 64bit integer)
Example
Input:
3
1
2
3
Output:
1
5
13
Source limit is 500 bytes.
hide comments
Phong:
20150418 16:21:46
I don't see why stage 4 is like that. How about stage 3? How could it be drawed ? Confused @@ 

Prasanna Patil:
20150417 16:55:07
After learning a lot math about triangles. It became so easy. Just 3 lines code in python. 

shantanu tripathi:
20150416 11:39:34
use unsigned long long to count the no of triangles....


KATURI SAI KIRAN:
20150403 13:25:48
Thanks @candide for your explaination. You are correct. Even I was confused with the question


Aditya:
20150329 08:24:48
Thanks Abhishek for suggestion of long long unsigned int....


kbt:
20150318 12:53:02
nice problem. formula derievation takes time nd after that its a 10 line code. #cakewalk


Malfple:
20150219 15:40:39
ah 3.1M ... 3.2M ... mine is 48M. Not using a single formula because i don't know any :P 

Govind Lahoti:
20150208 14:12:17
nice problem :)


Abhishek pratap singh:
20141209 13:16:19
@ayushi for the 4 the level


ayushi agarwal:
20141106 19:23:09
how the answer for level 4 is 27?? Mine is coming 26?? 
Added by:  nha.duong 
Date:  20070805 
Time limit:  1s 
Source limit:  500B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 ERL JSRHINO NODEJS OBJC PERL6 SQLITE VB.NET 
Resource:  Trần Huy Hưng 