Big Numbers Series
Submissions: 746   Accuracy:

28.1%

  Difficulty: Medium   Marks: 4

Given a series of numbers 0  1  4  18  96  600  4320 …., and series starting from n=0 , find the pattern and output the nth value of above series.

Input

  • The first line of the input contains a single integer T denoting the number of test cases.
  • The first line of each test case contains n.

Output

For each test case, output the nth value of above series.

Constraints

      1 ≤ T ≤ 101

    0 ≤ n≤ 100

 

Example

Input:

5

0

1

2

3

4

 

Output:

0

1

4

18

96

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: CHANDRAKANT
Author: TheRed_Viper


Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.