comefrom: <doocs>1588.Sum of All Odd Length Subarrays_1.py
code: def sumOddLengthSubarrays( arr: List[int]) -> int:
      n = len(arr)
      presum = [0] * (n + 1)
      for i in range(n):
          presum[i + 1] = presum[i] + arr[i]
      
      res = 0
      for i in range(n):
          for j in range(0, n, 2):
              if i + j < n:
                  res += presum[i + j + 1] - presum[i]
      return res
masked: def sample_funcname ( var_0 : List [ int ] ) -> int :
      var_1 = len ( var_0 )
      var_2 = [ 0 ] * ( var_1 + 1 )
      for var_3 in range ( var_1 ) :
          var_2 [ var_3 + 1 ] = var_2 [ var_3 ] + var_0 [ var_3 ]
      var_4 = 0
      for var_3 in range ( var_1 ) :
          for var_5 in range ( 0 , var_1 , 2 ) :
              if var_3 + var_5 < var_1 :
                  var_4 += var_2 [ var_3 + var_5 + 1 ] - var_2 [ var_3 ]
      return var_4
  