题目描述
Alice and Bob like playing games very much.Today, they introduce a new game.
There is a polynomial like this: (a0*x^(2^0)+1) * (a1 * x^(2^1)+1)*.......*(an-1 * x^(2^(n-1))+1). Then Alice ask Bob Q questions. In the expansion of the Polynomial, Given an integer P, please
tell the coefficient of the x^P.
Can you help Bob answer these questions?
输入
The first line of the input is a number T, which means the number of the test cases.
For each case, the first line conta......
阅读全文