Problem8295--求组合数 II

8295: 求组合数 II

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 256 MiB

Description

给定 n 组询问,每组询问给定两个整数 a,b,请你输出 $C^b_a \bmod\ (10^9+7)$ 的值。

Input

第一行包含整数 n。
接下来 n 行,每行包含一组 a 和 b。

Output

共 n 行,每行输出一个询问的解。

Constraints

$1≤n≤10000$
$1≤b≤a≤10^5$

Sample 1 Input

3
3 1
5 3
2 2

Sample 1 Output

3
10
1

Source/Category