Practice Count Ways to Make Array With Product
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Count Ways to Make Array With Product
Problem Statement
You are given a 2D integer array, queries. For each queries[i], where queries[i] = [ni, ki], find the number of different ways you can place positive integers into an array of size ni such that the product of the integers is ki. As the number of ways may be too large, the answer to the ith query is the number of ways modulo 10^9 + 7. Return an integer array answer where answer.length == queries.length, and answer[i] is the answer to the ith query.
Source: Count Ways to Make Array With Product on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
queries = [[2,6],[5,1],[73,660]]
[4,1,50734910]
# Example 2
queries = [[1,1],[2,2],[3,3],[4,4],[5,5]]
[1,2,3,10,5]
Constraints
Related LeetCode Problems
Practice more problems similar to Count Ways to Make Array With Product.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.