




'''simple docstring'''



class 	lowercase_					:


   """simple docstring"""

   def __init__(					self      :			Tuple					):

      """simple docstring"""
      # numbermap keys are the number and its values are lists of indexes sorted
      # in ascending order
      _SCREAMING_SNAKE_CASE =   {}
      # indexmap keys are an index and it's values are the number at that index
      _SCREAMING_SNAKE_CASE =   {}



   def 							lowerCAmelCase_    (					self      :			Optional[Any]						,   __lowerCamelCase      :			list | str | range						,   __lowerCamelCase      :			int					):

      """simple docstring"""
      if isinstance(__lowerCamelCase						,   (range, str)					):
         _SCREAMING_SNAKE_CASE =   list(__lowerCamelCase					)
      elif not isinstance(__lowerCamelCase						,   __lowerCamelCase					):
         raise TypeError(
             "binary_search_delete() only accepts either a list, range or str"					)

      _SCREAMING_SNAKE_CASE =   0
      _SCREAMING_SNAKE_CASE =   len(__lowerCamelCase					) - 1

      while low <= high:
         _SCREAMING_SNAKE_CASE =   (low + high) // 2
         if array[mid] == item:
            array.pop(__lowerCamelCase					)
            return array
         elif array[mid] < item:
            _SCREAMING_SNAKE_CASE =   mid + 1
         else:
            _SCREAMING_SNAKE_CASE =   mid - 1
      raise ValueError(
          "Either the item is not in the array or the array was unsorted"					)



   def 							lowerCAmelCase_    (					self      :			Any						,   __lowerCamelCase      :			list | str | range						,   __lowerCamelCase      :			int					):

      """simple docstring"""
      if isinstance(__lowerCamelCase						,   (range, str)					):
         _SCREAMING_SNAKE_CASE =   list(__lowerCamelCase					)
      elif not isinstance(__lowerCamelCase						,   __lowerCamelCase					):
         raise TypeError(
             "binary_search_insert() only accepts either a list, range or str"					)

      _SCREAMING_SNAKE_CASE =   0
      _SCREAMING_SNAKE_CASE =   len(__lowerCamelCase					) - 1

      while low <= high:
         _SCREAMING_SNAKE_CASE =   (low + high) // 2
         if array[mid] == index:
            # If the item already exists in the array,
            # insert it after the existing item
            array.insert(mid + 1						,   __lowerCamelCase					)
            return array
         elif array[mid] < index:
            _SCREAMING_SNAKE_CASE =   mid + 1
         else:
            _SCREAMING_SNAKE_CASE =   mid - 1

        # If the item doesn't exist in the array, insert it at the appropriate position
      array.insert(__lowerCamelCase						,   __lowerCamelCase					)
      return array



   def 							lowerCAmelCase_    (					self      :			Optional[int]						,   __lowerCamelCase      :			int						,   __lowerCamelCase      :			int					):

      """simple docstring"""
      # Remove previous index
      if index in self.indexmap:
         _SCREAMING_SNAKE_CASE =   self.indexmap[index]
         if len(self.numbermap[n]					) == 1:
            del self.numbermap[n]
         else:
            _SCREAMING_SNAKE_CASE =   self.binary_search_delete(self.numbermap[n]						,   __lowerCamelCase					)

        # Set new index
      _SCREAMING_SNAKE_CASE =   number

      # Number not seen before or empty so insert number value
      if number not in self.numbermap:
         _SCREAMING_SNAKE_CASE =   [index]

      # Here we need to perform a binary search insertion in order to insert
      # The item in the correct place
      else:
         _SCREAMING_SNAKE_CASE =   self.binary_search_insert(
             self.numbermap[number]						,   __lowerCamelCase					)



   def 							lowerCAmelCase_    (					self      :			Dict						,   __lowerCamelCase      :			int					):

      """simple docstring"""
      return self.numbermap.get(__lowerCamelCase						,   [-1]					)[0]


if __name__ == "__main__":
 import doctest

 doctest.testmod()







'''simple docstring'''



import math
def 				SCREAMING_SNAKE_CASE_				(							__A       :				Tuple						)				->				List[Any]:
   _SCREAMING_SNAKE_CASE =   0
   if n % 2 == 0:
      count += 1
      while n % 2 == 0:
         _SCREAMING_SNAKE_CASE =   int(n / 2						)
    # the n input value must be odd so that
    # we can skip one element (ie i += 2)

   _SCREAMING_SNAKE_CASE =   3

   while i <= int(math.sqrt(__A						)						):
      if n % i == 0:
         count += 1
         while n % i == 0:
            _SCREAMING_SNAKE_CASE =   int(n / i						)
      _SCREAMING_SNAKE_CASE =   i + 2

   # this condition checks the prime
   # number n is greater than 2

   if n > 2:
      count += 1
   return count


if __name__ == "__main__":
 lowerCamelCase_	 =		51_24_21_83
 print(f'''The number of distinct prime factors is/are {exact_prime_factor_count(n)}''')
 print(f'''The value of log(log(n)) is {math.log(math.log(n)):.4f}''')

