COMBD - Combinatorial Sequence
Your task is to evaluate the following series for a given n
2^n - ((n-1)C(1))*2^(n-2) + ((n-2)C(2))*2^(n-4) - ((n-3)C(3))*2^(n-6)+ ....................
(n)C(r) denotes n choose r.
Power of 2 is always non-negative.(i.e series terminates when either power of 2 goes negative or combinatorics becomes undefined)
First Line of Input Contains the number of test cases (t<=100000) ,then follows t lines ,each containg the value of n.(n<=100000)
You should output t lines, ith line contains answer of the ith test case
Yes, It really is :)
(Tjandra Satria Gunawan)(æ›¾æ¯…æ˜†):
too easy :P