Given an integer N. Consider all the possible permutations p[ ] of all integers from 1 to N. Calculate the value of X for each permutation :
X=∑i=Ni=1N−p[i]
Determine the sum of all X for all possible permutations.
Input format
Output format
For each test case, print a single line containing the answer.
Constraints
1≤T≤5
1≤N≤10
There are 2 possible permutations for N = 2 : p = [1, 2] and p = [2, 1].
For first permutation X = (2 - 1) + (2 - 2) = 1.
For second permutation X = (2 - 2) + (2 - 1) = 1.
So sum of X over 2 possible permutations = 2.