|All-time Popular Problems|
|Detect cycle in an undirected graph|
|BFS traversal of graph|
|Two Mirror Trees|
|Delete nodes having greater value on right|
|Find the number of islands|
|Sum of all prime numbers between 1 and N.|
|Determine if Two Trees are Identical|
|Longest Palindrome in a String|
A function f is defined as follows F(n)= (1) +(2*3) + (4*5*6) ... n. Given an integer n the task is to print the F(n)th term.
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test contains an integer n.
For each test case print the nth term of the sequence. .