comefrom: <doocs>2191.Sort the Jumbled Numbers_1.py
code: def sortJumbled( mapping: List[int], nums: List[int]) -> List[int]:
      m = []
      for i, v in enumerate(nums):
          a, b, t = v, 0, 1
          while 1:
              a, x = divmod(a, 10)
              x = mapping[x]
              b = x * t + b
              t *= 10
              if a == 0:
                  break
          m.append((b, i, v))
      m.sort()
      for i, v in enumerate(m):
          nums[i] = v[2]
      return nums
masked: def sample_funcname ( var_0 : List [ int ] , var_1 : List [ int ] ) -> List [ int ] :
      var_2 = [ ]
      for var_3 , var_4 in enumerate ( var_1 ) :
          var_5 , var_6 , var_7 = var_4 , 0 , 1
          while 1 :
              var_5 , var_8 = divmod ( var_5 , 10 )
              var_8 = var_0 [ var_8 ]
              var_6 = var_8 * var_7 + var_6
              var_7 *= 10
              if var_5 == 0 :
                  break
          var_2.append ( ( var_6 , var_3 , var_4 ) )
      var_2.sort ( )
      for var_3 , var_4 in enumerate ( var_2 ) :
          var_1 [ var_3 ] = var_4 [ 2 ]
      return var_1
  