Problem B: Sum

Problem B: Sum

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 1659  Solved: 490
[Submit][Status][Web Board]

Description

Given \(n\), please calculate \(S(n)\) where
\[
S(n)=\sum_{i=1}^n i*(i+1)/2
\]

Input

The 1st line is a positive integer \(T(1⩽ T ⩽ 100000)\)which is the number of test cases.

Then \(T\) lines follow. Each line has an integer \(n(1⩽ n ⩽ 1000000)\) for a test case.

Output

Output T lines. Each line is the result value ans.

Sample Input

2
1
2

Sample Output

1
4

HINT

[Submit][Status]