#P2807. 三角形计数

三角形计数

Description

Divide each side of the large triangle into nn equal parts. Connect the corresponding division points, with the connecting lines respectively parallel to the three sides. How many triangles are there in total? Write a program to solve this problem.

Input Format

The first line contains an integer tt (t100t \le 100), indicating the number of test cases. The next tt lines each contain a positive integer nn (n500n \le 500).

Output Format

For each nn, output a single positive integer, representing the number of triangles.

3
1
2
3
1
5
13

Hint

Translated by ChatGPT 5