comefrom: <qiyuangong>370_Range_Addition_1.py
code: 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
masked: def sample_funcname ( var_0 , var_1 ) :
      var_2 = [ 0 ] * var_0
      for var_3 in var_1 :
          var_4 , var_5 , var_6 = var_3
          var_2 [ var_4 ] += var_6
          if var_5 < var_0 - 1 :
              var_2 [ var_5 + 1 ] -= var_6
      for var_7 in range ( 1 , var_0 ) :
          var_2 [ var_7 ] = var_2 [ var_7 ] + var_2 [ var_7 - 1 ]
      return var_2
  