<doocs>0739.Daily Temperatures_1.py
def dailyTemperatures( temperatures: List[int]) -> List[int]:
    ans = [0] * len(temperatures)
    stk = []
    for i, t in enumerate(temperatures):
        while stk and temperatures[stk[-1]] < t:
            j = stk.pop()
            ans[j] = i - j
        stk.append(i)
    return ans
def sample_funcname ( var_0 : List [ int ] ) -> List [ int ] :
    var_5 = [ 0 ] * len ( var_0 )
    var_6 = [ ]
    for var_8 , var_9 in enumerate ( var_0 ) :
        while var_6 and var_0 [ var_6 [ - 1 ] ] < var_9 :
            var_12 = var_6.pop ( )
            var_5 [ var_12 ] = var_8 - var_12
        var_6.append ( var_8 )
    return var_5
