<qiyuangong>370_Range_Addition_1.py
def getModifiedArray( length, updates):
    res = [0] * length
    for t in updates:
        start, end, val = t
        res[start] += val
        if end < length - 1:
            res[end + 1] -= val
    for i in range(1, length):
        res[i] = res[i] + res[i - 1]
    return res
def sample_funcname ( var_0 , var_1 ) :
    var_3 = [ 0 ] * var_0
    for var_4 in var_1 :
        var_5 , var_6 , var_7 = var_4
        var_3 [ var_5 ] += var_7
        if var_6 < var_0 - 1 :
            var_3 [ var_6 + 1 ] -= var_7
    for var_10 in range ( 1 , var_0 ) :
        var_3 [ var_10 ] = var_3 [ var_10 ] + var_3 [ var_10 - 1 ]
    return var_3
