Anki and her Patterns

2.5

2 votes
Very-Easy
Problem

Anki loves observing patterns and tries to formulate them mathematically. She even writes code to generate the pattern and find the Nth term of the pattern. One fine day, she came across the following pattern and now needs your help to write the code for the same. Observe the following pattern and help Anki find the Nth term.

3/1, 6/2, 11/3, 18/4, 27/5, ....

Input format:

The first line of input contains number of test cases T. Next T lines contains the value N, for which you have to find Nth term of the given pattern.

Output format:

Each line will print the Nth term for the corresponding value N.

Constraints

1T105
1N105

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?