Subarrays with Small Product — Solution & Editorial
Sliding window on the product (positivity makes it monotone): extend right, shrink left while the product reaches K; each right endpoint adds (window length) subarrays.
Complexity: O(N)
Watch out: The count reaches ~5×109 — 64-bit.