Divisors of Binomial Coefficient

AtCoder
IDabc227_g
Time2000ms
Memory256MB
Difficulty
Find the number, modulo $998244353$, of positive divisors of a binomial coefficient $\displaystyle \binom{N}{K}$. ## Constraints * $1 \leq N \leq 10^{12}$ * $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: $N$ $K$ [samples]
Samples
Input #1
5 2
Output #1
4

We have $\displaystyle \binom{5}{2}=10$, which has four positive divisors: $1,2,5,10$.
Input #2
103 3
Output #2
8

We have $\displaystyle \binom{103}{3}=176851$, which has eight positive divisors.
Input #3
1000000000000 1000000
Output #3
110520107
API Response (JSON)
{
  "problem": {
    "name": "Divisors of Binomial Coefficient",
    "description": {
      "content": "Find the number, modulo $998244353$, of positive divisors of a binomial coefficient $\\displaystyle \\binom{N}{K}$.",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc227_g"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Find the number, modulo $998244353$, of positive divisors of a binomial coefficient $\\displaystyle \\binom{N}{K}$.\n\n## Constraints\n\n*   $1 \\leq N \\leq 10^{12}$\n*   $0 \\leq K \\leq \\min(10^6,N)$\n*   All ...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments