<doocs>0713.Subarray Product Less Than K_1.py
def numSubarrayProductLessThanK( nums: List[int], k: int) -> int:
    ans, s, j = 0, 1, 0
    for i, v in enumerate(nums):
        s *= v
        while j <= i and s >= k:
            s //= nums[j]
            j += 1
        ans += i - j + 1
    return ans
def sample_funcname ( var_0 : List [ int ] , var_3 : int ) -> int :
    var_5 , var_7 , var_8 = 0 , 1 , 0
    for var_10 , var_11 in enumerate ( var_0 ) :
        var_7 *= var_11
        while var_8 <= var_10 and var_7 >= var_3 :
            var_7 //= var_0 [ var_8 ]
            var_8 += 1
        var_5 += var_10 - var_8 + 1
    return var_5
