<doocs>0122.Best Time to Buy and Sell Stock II_1.py
def maxProfit( prices: List[int]) -> int:
    res = 0
    for i in range(1, len(prices)):
        t = prices[i] - prices[i - 1]
        res += max(t, 0)
    return res
def sample_funcname ( var_0 : List [ int ] ) -> int :
    var_4 = 0
    for var_8 in range ( 1 , len ( var_0 ) ) :
        var_9 = var_0 [ var_8 ] - var_0 [ var_8 - 1 ]
        var_4 += max ( var_9 , 0 )
    return var_4
