题目描述
Problem Description
Given two positive integers $ A $ and $ B $. Find the number of positive integers that are divisors of $ A! $ and multiples of $ B! $, modulo $ 1,000,000,007 $.
Input Format
The input is given from the standard input in the following format:
$ A $ $ B $
- The first line contains two integers $ A $ and $ B $ ($1 \leq B \leq A \leq 10^9$, $A - B \leq 100$) separated by a space.
Output Format
Output the number of positive integers that satisfy the condition, modulo $ 1,000,000,007 $, on the first line.
Do not forget the newline at the end.
Sample Input and Output
Sample Input #1
3 2
Sample Output #1
2
Sample Input #2
15 4
Sample Output #2
2592
Sample Input #3
1000000 999900
Sample Output #3
21398499
Sample Input #4
1000000000 999999900
Sample Output #4
745508745
Notes/Hints
Partial Points
This problem has partial points.
- $ 5 $ points for test cases where $1 \leq B \leq A \leq 15$.
- Another $ 35 $ points for test cases where $1 \leq B \leq A \leq 10^6$, $A - B \leq 100$.
Sample Explanation 1
For a positive integer $ n $, $ n! $ represents the factorial of $ n $, which is $n \times (n - 1) \times (n - 2) \times \ldots \times 1$. The divisors of $3! = 3 \times 2 \times 1 = 6$ that are also multiples of $2! = 2 \times 1 = 2$ are $ 2 $ and $ 6 $, totaling $ 2 $ numbers.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分