Maximize Number of Nice Divisors
You are given a positive integer primeFactors. You are asked to construct a positive integer n that satisfies the following conditions:
- The number of prime factors of
n(not necessarily distinct) is at mostprimeFactors. - The number of nice divisors of
nis maximized. A divisor ofnis nice if it is divisible by every prime factor ofn.
Return the number of nice divisors of n. Since that number can be too large, return it modulo 10^9 + 7.
A prime number is a natural number greater than 1 that is not a product of two smaller natural numbers. The prime factors of a number n are a list of prime numbers such that their product equals n.
Example 1
Input
primeFactors = 5Output
6200 is valid with 5 prime factors [2, 2, 2, 5, 5] and has 6 nice divisors, which is the maximum possible.
Example 2
Input
primeFactors = 8Output
18The maximum possible number of nice divisors using at most 8 prime factors is 18.
Constraints
- 1 <= primeFactors <= 10^9