





from .number_theory.prime_numbers import next_prime







class 		_lowerCAmelCase:

  """simple docstring"""







  def __init__(   self    ,							UpperCAmelCase    ,							UpperCAmelCase = None    ,							UpperCAmelCase = None    ,							)->   Tuple:
     __A    =  size_table
     __A    =  [None] * self.size_table
     __A    =  0.75 if lim_charge is None else lim_charge
     __A    =  1 if charge_factor is None else charge_factor
     __A    =  []
     __A    =  {}

  def 						SCREAMING_SNAKE_CASE__			(   self      )->   Optional[Any]:
     return self._keys

  def 						SCREAMING_SNAKE_CASE__			(   self      )->   List[str]:
     return sum(1 for slot in self.values if slot is not None      ) / (
         self.size_table * self.charge_factor
     )

  def 						SCREAMING_SNAKE_CASE__			(   self    ,							UpperCAmelCase      )->   List[str]:
     return key % self.size_table

  def 						SCREAMING_SNAKE_CASE__			(   self    ,							UpperCAmelCase      )->   Tuple:
     print(f"step {step_ord}"      )
     print(list(range(len(self.values      )      )      )      )
     print(self.values      )

  def 						SCREAMING_SNAKE_CASE__			(   self    ,							UpperCAmelCase      )->   Dict:
     __A    =  1
     __A    =  values
     for value in values:
        self.insert_data(lowerCamelCase_      )
        self._step_by_step(lowerCamelCase_      )
        i += 1

  def 						SCREAMING_SNAKE_CASE__			(   self    ,							UpperCAmelCase    ,							UpperCAmelCase      )->   Dict:
     __A    =  data
     __A    =  data

  def 						SCREAMING_SNAKE_CASE__			(   self    ,							UpperCAmelCase    ,							UpperCAmelCase=None      )->   Optional[int]:
     __A    =  self.hash_function(key + 1      )

     while self.values[new_key] is not None and self.values[new_key] != key:
        if self.values.count(lowerCamelCase_      ) > 0:
           __A    =  self.hash_function(new_key + 1      )
        else:
           __A    =  None
           break

     return new_key

  def 						SCREAMING_SNAKE_CASE__			(   self      )->   Optional[Any]:
     __A    =  [value for value in self.values if value is not None]
     __A    =  next_prime(self.size_table    ,							factor=2      )
     self._keys.clear()
     __A    =  [None] * self.size_table  # hell's pointers D: don't DRY ;/
     for value in survivor_values:
        self.insert_data(lowerCamelCase_      )





  def 						SCREAMING_SNAKE_CASE__			(   self    ,							UpperCAmelCase      )->   List[str]:
     __A    =  self.hash_function(lowerCamelCase_      )

     if self.values[key] is None:
        self._set_value(lowerCamelCase_    ,							lowerCamelCase_      )

     elif self.values[key] == data:
        pass

     else:
        __A    =  self._collision_resolution(lowerCamelCase_    ,							lowerCamelCase_      )
        if collision_resolution is not None:
           self._set_value(lowerCamelCase_    ,							lowerCamelCase_      )
        else:
           self.rehashing()
           self.insert_data(lowerCamelCase_      )


"""simple docstring"""







def   __lowerCAmelCase(		__UpperCAmelCase  ,__UpperCAmelCase      ):






	"""simple docstring"""





	if n == 0:
		return 1

	elif n % 2 == 1:
		return binary_exponentiation(__UpperCAmelCase  ,n - 1      ) * a

	else:
		_lowercase			:     Dict      					=				binary_exponentiation(__UpperCAmelCase  ,n / 2      )
		return b * b


if __name__ == "__main__":
						try:
												SCREAMING_SNAKE_CASE						=    int(input('Enter Base : ').strip())
												SCREAMING_SNAKE_CASE						=    int(input('Enter Power : ').strip())
						except ValueError:
												print('Invalid literal for integer')

						SCREAMING_SNAKE_CASE						=    binary_exponentiation(BASE, POWER)
						print(f"""{BASE}^({POWER}) : {RESULT}""")



