You are given an integer array nums and an integer k.
An operation consists of selecting a non empty contiguous subarray of nums by removing an optionally empty prefix and an optionally empty suffix. The value of the resulting subarray is the product of all its elements modulo k.
Return an array of integers of length k, where the element at index x (for x.
Constraints:
nums.length
nums[i]
k
You are given an integer array nums and an integer k.
An operation consists of selecting a non empty contiguous subarray of nums by removing an optionally empty prefix and an optionally empty suffix. The value of the resulting subarray is the product of all its elements modulo k.
Return an array of integers of length k, where the element at index x (for x.
Constraints:
nums.length
nums[i]
k