#t426. 鸣人的影分身

鸣人的影分身

Shadow Clones

Problem Description

In the world of Naruto, it is crucial to keep your enemy guessing. The protagonist Naruto's technique — the Multi Shadow Clone Jutsu — is a good example.

A shadow clone is created from Naruto's chakra; the more chakra is used, the stronger the clone.

Depending on the situation, Naruto may create clones of different strengths: some to feint, some to deliver a fatal blow.

Now suppose Naruto has chakra MM and can create at most NN shadow clones. In how many different ways (call it KK) can he distribute the chakra among the clones? (A clone may be assigned 00 chakra.)

Input Format

The first line is the number of test cases tt (0≤t≤200 \le t \le 20). Each of the following lines contains two integers MM and NN (1≤M,N≤101 \le M, N \le 10), separated by a space.

Output Format

For each pair M,NM, N, output the corresponding KK on one line.

Sample Input

1
7 3

Sample Output

8

Limitation

1 s, 1024 KiB for each test case.