




from collections import deque

from .hash_table import HashTable



class      a	(  _A     ):

     '''simple docstring'''





     def __init__(      self  :     int   ,       *__snake_case  :     List[Any]   ,       **__snake_case  :     Any							):
         super().__init__(*_lowerCAmelCase   ,       **_lowerCAmelCase							)
     def     lowerCamelCase_  (      self  :     Tuple   ,       __snake_case  :     Optional[int]   ,       __snake_case  :     List[Any]							):
         UpperCAmelCase_									=	deque([]							) if self.values[key] is None else self.values[key]
         self.values[key].appendleft(_lowerCAmelCase							)
         UpperCAmelCase_									=	self.values[key]
     def     lowerCamelCase_  (      self  :     List[str]							):
         return (
             sum(self.charge_factor - len(_lowerCAmelCase							) for slot in self.values							)
             / self.size_table
             * self.charge_factor
         )




     def     lowerCamelCase_  (      self  :     List[str]   ,       __snake_case  :     Any   ,       __snake_case  :     List[str]=None							):
         if not (
             len(self.values[key]							) == self.charge_factor and self.values.count(_lowerCAmelCase							) == 0
         ):
             return key
         return super()._collision_resolution(_lowerCAmelCase   ,       _lowerCAmelCase							)









def       _lowerCAmelCase    (				lowerCAmelCase_				:List[str]		,    lowerCAmelCase_				:int				)->Optional[int]:
   '''simple docstring'''






   snake_case_            =       0
   while b > 0:
      if b & 1:
         res += a

      a += a
      b >>= 1

   return res



def       _lowerCAmelCase    (				lowerCAmelCase_				:int		,    lowerCAmelCase_				:List[str]		,    lowerCAmelCase_				:Dict				)->Dict:
   '''simple docstring'''






   snake_case_            =       0
   while b > 0:
      if b & 1:
         snake_case_            =       ((res % c) + (a % c)) % c

      a += a
      b >>= 1

   return res




