Search
⌘K
Get Premium
Leetcode 1735. Count Ways to Make Array With Product
For each query (n, k), count n-length positive integer arrays whose product is k by prime-factorizing k and using stars-and-bars to distribute each prime's exponents across the n positions; the answer is the product of those binomial counts taken modulo 1e9+7.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.