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_1 : int ) -> float :
      var_3 = var_2 = 0
      var_4 = 0
      while var_1 :
          var_5 , var_6 = var_0 [ var_2 ]
          var_7 = var_5 - var_4
          var_3 += min ( var_7 , var_1 ) * var_6 / 100
          if var_1 <= var_7 :
              break
          var_1 -= var_7
          var_2 += 1
          var_4 = var_5
      return var_3
  