Abhimanyu simply drew two triangles, as shown in the picture below-
He says this, Level 1 Triangles.
Then he drew two more triangles, as shown in the picture below-
He says this, Level 2 Triangles.
Similarly he defined Level 3, 4, 5, ..., N Triangles. You simply need to tell him total no. of triangles in Level N Triangle.
Input:
First line contains number of test cases T. Each test case contains a single integer the level of triangle N.
Output:
For each test case print total number of triangles.
Constraints:
There are three types of test files.
Type1:
1 <= T <= 105
1 <= N <= 106
Type2:
1 <= T <= 103
106 < N <= 1012
Type3:
1 <= T <= 102
1012 < N <= 1016
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Login to unlock the editorial