Consecutive sum II
Time limit:3000/1000 MS (java/others) Memory limit:32768/32768 K (java/others)
Total submission (s): 2523 Accepted Submission (s): 1219
Problem descriptionconsecutive sum come again. Is it ready? Go ~ ~
1 = 0 + 1
2+3+4 = 1 + 8
5+6+7+8+9 = 8 + 27
...
You can see the consecutive sum can is representing like that. The nth line'll has 2*n+1 consecutive numbers on the left and the first number on the right equal with the second number I n last line, and the sum of the left numbers equal with the number ' s sum in the right.
Your task is this tell me the right numbers in the nth line.
Inputthe First integer is T, and T lines would follow.
Each line would contain an integer n (0 <= n <= 2100000).
Outputfor each case, output the right numbers in the Nth line.
All answer in the range of signed 64-bits Integer.
Sample Input3012
Sample Output0 11 88 27 Find the Law
HDOJ 1977 consecutive sum II