SP1730 TCOUNT2 - Counting Triangles II

Description

We define the LEVEL of a triangle as in the following illustrative image: ![](https://cdn.luogu.com.cn/upload/vjudge_pic/SP1730/c8edf80b02c0246e6d8c8bf8821d8da784b7a23f.png) And we continue defining the LEVEL of a hexagon. It's called level N hexagon if it’s joined by 6 triangles, each one is a level N triangle. ![](https://cdn.luogu.com.cn/upload/vjudge_pic/SP1730/dfe5783e2fdfaf260a0941036c24cbafd1c7de30.png) **Task:** All you have to do is to count all triangles in the “level N” hexagon.

Input Format

The first line of the input contains an integer T - the number of test cases and T lines follow. Each line contains an integer N which is the level of the hexagon in that test case.

Output Format

For each test case, you should write a seperate line: the number of triangles in the “level N” hexagon. (All answers will fit within the range of a 64-bit positive integer)