#P2386. 放苹果

放苹果

Description

Place mm identical apples into nn identical plates. Empty plates are allowed. How many different distributions are there? (5,1,15,1,1 and 1,1,51,1,5 are considered the same way.)

Input Format

The first line contains the number of testdata tt. Each of the following lines contains two integers mm and nn, separated by a space.

Output Format

For each pair mm and nn in the input, output the corresponding result on a single line.

1
7 3
8
3
3 2
4 3
2 7

2
4
2

Hint

For all testdata, it is guaranteed that 1m,n101 \leq m, n \leq 10, 0t200 \leq t \leq 20.

Translated by ChatGPT 5