1904 : Alex and balls

时间限制:1 Sec 内存限制:128 MiB
提交:118 答案正确:16

提交 状态 讨论区

题目描述

Given n balls(each ball should be regard as same) and m boxes(each box is different with each other), now you need to divide the n balls into the m boxes, and each box contains at least one ball

输入

Input starts with an integer T (≤ 10000), denoting the number of test cases. Each case contains two integers n,m (1 ≤ n, m ≤ 1000 and m <= n).

输出

 For each case, print the case number and your answer(mod 1000000007). Each case for one line.

样例输入

复制
2
1 1
3 2

样例输出

复制
Case 1: 1
Case 2: 2

提示


			

来源

[NBUT]Alex