comefrom: <doocs>2144.Minimum Cost of Buying Candies With Discount_1.py
code: def minimumCost( cost: List[int]) -> int:
      cost.sort()
      ans, n = 0, len(cost)
      for i in range(n - 1, -1, -3):
          ans += cost[i]
          if i >= 1:
              ans += cost[i - 1]
      return ans
masked: def sample_funcname ( var_0 : List [ int ] ) -> int :
      var_0.sort ( )
      var_5 , var_7 = 0 , len ( var_0 )
      for var_11 in range ( var_7 - 1 , - 1 , - 3 ) :
          var_5 += var_0 [ var_11 ]
          if var_11 >= 1 :
              var_5 += var_0 [ var_11 - 1 ]
      return var_5
  