AlphaGrep Securities monitors contiguous runs of positive integer signals and needs to count how many have a combined product below a threshold. Given an array nums of positive integers and an integer k, return the number of contiguous, non-empty subarrays whose product is strictly less than k.
Implement num_subarray_product_less_than_k(nums, k).
nums, a list of positive integers, and k, a positive integer.k.def num_subarray_product_less_than_k(nums, k):