<doocs>0495.Teemo Attacking_1.py
def findPoisonedDuration( timeSeries: List[int], duration: int) -> int:
    n, res = len(timeSeries), duration
    for i in range(n - 1):
        res += min(duration, timeSeries[i + 1] - timeSeries[i])
    return res
def sample_funcname ( var_0 : List [ int ] , var_3 : int ) -> int :
    var_5 , var_6 = len ( var_0 ) , var_3
    for var_9 in range ( var_5 - 1 ) :
        var_6 += min ( var_3 , var_0 [ var_9 + 1 ] - var_0 [ var_9 ] )
    return var_6
