#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 and can create at most shadow clones. In how many different ways (call it ) can he distribute the chakra among the clones? (A clone may be assigned chakra.)
Input Format
The first line is the number of test cases (). Each of the following lines contains two integers and (), separated by a space.
Output Format
For each pair , output the corresponding on one line.
Sample Input
1
7 3
Sample Output
8
Limitation
1 s, 1024 KiB for each test case.