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_1 , var_2 = 0 , len ( var_0 )
      for var_3 in range ( var_2 - 1 , - 1 , - 3 ) :
          var_1 += var_0 [ var_3 ]
          if var_3 >= 1 :
              var_1 += var_0 [ var_3 - 1 ]
      return var_1
  