Problem6490--求组合数 I

6490: 求组合数 I

[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≤10,000$
$1≤b≤a≤2,000$

Sample 1 Input

3
3 1
5 3
2 2

Sample 1 Output

3
10
1

HINT

题目来源:AcWing

Source/Category