Problem
Given an array of positive integers nums and an integer k, return the number of contiguous subarrays whose product is strictly less than `k`.
Example 1
- Input
- nums = [10, 5, 2, 6], k = 100
- Output
- 8
Example 2
[10] [5] [2] [6] [10, 5] [5, 2] [2, 6] [5, 2, 6]
Example 3
- Input
- nums = [1, 2, 3], k = 0
- Output
- 0
Constraints
1 <= nums.length <= 3 * 10^41 <= nums[i] <= 10000 <= k <= 10^6