comefrom: <doocs>1475.Final Prices With a Special Discount in a Shop_1.py
code: def finalPrices( prices: List[int]) -> List[int]:
      stk = []
      ans = prices[:]
      for i, v in enumerate(prices):
          while stk and prices[stk[-1]] >= v:
              ans[stk.pop()] -= v
          stk.append(i)
      return ans
masked: def sample_funcname ( var_0 : List [ int ] ) -> List [ int ] :
      var_3 = [ ]
      var_4 = var_0 [ : ]
      for var_6 , var_7 in enumerate ( var_0 ) :
          while var_3 and var_0 [ var_3 [ - 1 ] ] >= var_7 :
              var_4 [ var_3.pop ( ) ] -= var_7
          var_3.append ( var_6 )
      return var_4
  