1735. Count Ways to Make Array With Product
https://leetcode.com/problems/count-ways-to-make-array-with-product
Description
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 109 + 7
.
Return an integer array answer
where answer.length == queries.length
, and answer[i]
is the answer to the ith
query.
Example 1:
Example 2:
Constraints:
1 <= queries.length <= 104
1 <= ni, ki <= 104
ac
Last updated