comefrom: <doocs>2171.Removing Minimum Number of Magic Beans_1.py
code: def minimumRemoval( beans: List[int]) -> int:
      beans.sort()
      ans = s = sum(beans)
      n = len(beans)
      for i, v in enumerate(beans):
          ans = min(ans, s - v * (n - i))
      return ans
masked: def sample_funcname ( var_0 : List [ int ] ) -> int :
      var_0.sort ( )
      var_6 = var_4 = sum ( var_0 )
      var_8 = len ( var_0 )
      for var_10 , var_11 in enumerate ( var_0 ) :
          var_6 = min ( var_6 , var_4 - var_11 * ( var_8 - var_10 ) )
      return var_6
  