#abc227g. G - Divisors of Binomial Coefficient

G - Divisors of Binomial Coefficient

Score : 600600 points

问题陈述

求一个二项式系数 (NK)\displaystyle \binom{N}{K} 的正除数的数量,模 998244353998244353

以上为通义千问 qwen-max 翻译,仅供参考。

Problem Statement

Find the number, modulo 998244353998244353, of positive divisors of a binomial coefficient (NK)\displaystyle \binom{N}{K}.

Constraints

  • 1N10121 \leq N \leq 10^{12}
  • 0Kmin(106,N)0 \leq K \leq \min(10^6,N)
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

NN KK

Output

Print the answer.

Sample Input 1

5 2

Sample Output 1

4

We have (52)=10\displaystyle \binom{5}{2}=10, which has four positive divisors: 1,2,5,101,2,5,10.

Sample Input 2

103 3

Sample Output 2

8

We have (1033)=176851\displaystyle \binom{103}{3}=176851, which has eight positive divisors.

Sample Input 3

1000000000000 1000000

Sample Output 3

110520107

update @ 2024/3/10 09:57:36