Weighted Triangular Sum

Time limit1sMemory limit128 MB

Problem

The n-th triangular number T(n) is the sum of all integers from 1 through n.

T(n) = 1 + 2 + ... + n

For a given positive integer n, define W(n) as the weighted sum of triangular numbers:

W(n) = sum from k = 1 to n of k * T(k + 1)

Given n, write a program that computes W(n).

Input

The first line contains the number of test cases T.

Each test case consists of one integer n. (1 <= n <= 300)

Output

For each test case, output W(n) on its own line.