Factorials and a recurrence
Time limit2sMemory limit512 MB
Given N and K, compute the number of divisors of S(N,K), where S follows the given recurrence, modulo 1,000,000,009.
- Level
Medium7 of 10
- Topics
- Number theory, Dynamic programming, Combinatorics, Math
- Solved
- No attempts yet
Problem
is defined as follows.
- when
- when
- otherwise
Apply the rules in the order listed.
For example, , and .
Given and , count the divisors of .
Input
The first line contains and separated by a space. (, )
Output
Print the number of divisors of modulo 1,000,000,009 on the first line.