#P5947. [POI 2003] Trinomial
[POI 2003] Trinomial
Problem Description
Find the coefficient of the -th term of .
Input Format
The first line contains an integer , the number of test cases.
The next lines each contain two integers .
Output Format
For each test case, output the result of .
5
2 0
7 4
4 5
5 3
8 15
1
2
1
0
2
Hint
Constraints: for of the testdata, , , and .
Translated by ChatGPT 5