comefrom: <doocs>1402.Reducing Dishes_1.py
code: def maxSatisfaction( satisfaction: List[int]) -> int:
      satisfaction.sort(reverse=True)
      ans = presum = 0
      for v in satisfaction:
          presum += v
          if presum > 0:
              ans += presum
          else:
              break
      return ans
masked: def sample_funcname ( var_0 : List [ int ] ) -> int :
      var_0.sort ( var_4 = True )
      var_8 = var_6 = 0
      for var_9 in var_0 :
          var_6 += var_9
          if var_6 > 0 :
              var_8 += var_6
          else :
              break
      return var_8
  