comefrom: <doocs>2303.Calculate Amount Paid in Taxes_1.py
code: def calculateTax( brackets: List[List[int]], income: int) -> float:
      ans = idx = 0
      prev = 0
      while income:
          a, b = brackets[idx]
          d = a - prev
          ans += min(d, income) * b / 100
          if income <= d:
              break
          income -= d
          idx += 1
          prev = a
      return ans
masked: def sample_funcname ( var_0 : List [ List [ int ] ] , var_3 : int ) -> float :
      var_7 = var_5 = 0
      var_8 = 0
      while var_3 :
          var_9 , var_10 = var_0 [ var_5 ]
          var_11 = var_9 - var_8
          var_7 += min ( var_11 , var_3 ) * var_10 / 100
          if var_3 <= var_11 :
              break
          var_3 -= var_11
          var_5 += 1
          var_8 = var_9
      return var_7
  