Round 1
Questions: You are given an array a of length n consisting of positive integers, and a number k.
Your task is to find the number of subsequences of 'a' such that the product of the numbers in the subsequence divides k. Since the answer can be large, return it modulo 10^9 + 7.
Input Format:
- The first line contains an integer, n, denoting the number of elements in 'a'.
- The next line contains an integer, k, denoting the number k.
- Each line i of the n subsequent lines (where 0 ≤ i < n) contains an integer describing a[i].
Constraints:
- 1 <= n <= 10^5
- 1 <= k <= 10^9
- 1 <= a[i] <= 10^9
Sample Test Cases:
Case 1
Input:
3 5 3 7 9
Output:
0
Explanation: Here, n=3, k=5, a=[3,7,9]. There are no valid subsequences where the product of numbers divides k=5. Hence, the answer is 0.
Case 2
Input:
4 4 2 2 2 2
Output:
11
Candidate's Approach
No approach provided.
Interviewer's Feedback
No feedback provided.