Please enter your email address or userHandle.
Given a series as shown below:
3 4 5 6
7 8 9 10 11 12
13 14 15 16 17 18 19 20
You are given a number N, you need to write a program to find the sum of all elements in the N-th row of above series.
First line of input contains a single integer T which denotes the number of test cases. First line of each test case contains a single intger N.
For each test case, print the sum of all the elements present in Nth row of above series.
We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?
Login to access your submissions.
Please choose 'ReadOnlyMode' if you needn't to 'Edit' the problem e.g. viewing OJ's solution, TestCase Files (TCFs), TimeLimit etc.