




'''simple docstring'''






import unittest
from timeit import timeit






def 		UpperCamelCase__			(		__SCREAMING_SNAKE_CASE							,			__SCREAMING_SNAKE_CASE		)						->      int:
      snake_case__					:      Dict  			=						first_num if first_num >= second_num else second_num
      snake_case__					:      Dict  			=						max_num
      while (common_mult % first_num > 0) or (common_mult % second_num > 0):
            common_mult += max_num
      return common_mult






def 		UpperCamelCase__			(		__SCREAMING_SNAKE_CASE							,			__SCREAMING_SNAKE_CASE		)						->      int:
      return b if a == 0 else greatest_common_divisor(b % a							,			__SCREAMING_SNAKE_CASE		)






def 		UpperCamelCase__			(		__SCREAMING_SNAKE_CASE							,			__SCREAMING_SNAKE_CASE		)						->      int:
      return first_num // greatest_common_divisor(__SCREAMING_SNAKE_CASE							,			__SCREAMING_SNAKE_CASE		) * second_num






def 		UpperCamelCase__			(		)						->      Optional[int]:
      snake_case__					:      Any  			=						(
          'from __main__ import least_common_multiple_slow, least_common_multiple_fast'
      )
      print(
          'least_common_multiple_slow():'							,			timeit('least_common_multiple_slow(1000, 999)'							,			setup=__SCREAMING_SNAKE_CASE		)							,			)
      print(
          'least_common_multiple_fast():'							,			timeit('least_common_multiple_fast(1000, 999)'							,			setup=__SCREAMING_SNAKE_CASE		)							,			)






class 					lowercase_			(	unittest.TestCase       ):
     A_       							= (
         (1_0, 2_0),
         (1_3, 1_5),
         (4, 3_1),
         (1_0, 4_2),
         (4_3, 3_4),
         (5, 1_2),
         (1_2, 2_5),
         (1_0, 2_5),
         (6, 9),
     )
     A_       							= (2_0, 1_9_5, 1_2_4, 2_1_0, 1_4_6_2, 6_0, 3_0_0, 5_0, 1_8)





     def  _lowerCAmelCase			(    self    :				Union[str, Any] ):
           for i, (first_num, second_num) in enumerate(self.test_inputs ):
                 snake_case__					:      Dict  			=						least_common_multiple_slow(__lowerCamelCase    ,       __lowerCamelCase )
                 snake_case__					:      str  			=						least_common_multiple_fast(__lowerCamelCase    ,       __lowerCamelCase )
                 with self.subTest(i=__lowerCamelCase ):
                       self.assertEqual(__lowerCamelCase    ,       self.expected_results[i] )
                       self.assertEqual(__lowerCamelCase    ,       self.expected_results[i] )


if __name__ == "__main__":
      benchmark()
      unittest.main()






'''simple docstring'''






class 					lowercase_			:





     def __init__(    self    :				Any ):
           snake_case__					:      List[str]  			=						[0]
           snake_case__					:      Optional[Any]  			=						0





     def  _lowerCAmelCase			(    self    :				List[str]    ,       __lowerCamelCase    :				int ):
           snake_case__					:      Optional[int]  			=						self.__heap[i]
           while i // 2 > 0:
                 if self.__heap[i] > self.__heap[i // 2]:
                       snake_case__					:      Union[str, Any]  			=						self.__heap[i // 2]
                       snake_case__					:      Union[str, Any]  			=						temporary
                 i //= 2





     def  _lowerCAmelCase			(    self    :				int    ,       __lowerCamelCase    :				int ):
           self.__heap.append(__lowerCamelCase )
           self.__size += 1
           self.__swap_up(self.__size )





     def  _lowerCAmelCase			(    self    :				Dict    ,       __lowerCamelCase    :				int ):
           while self.__size >= 2 * i:
                 if 2 * i + 1 > self.__size:
                       snake_case__					:      List[str]  			=						2 * i
                 else:
                       if self.__heap[2 * i] > self.__heap[2 * i + 1]:
                             snake_case__					:      Any  			=						2 * i
                       else:
                             snake_case__					:      Tuple  			=						2 * i + 1
                 snake_case__					:      int  			=						self.__heap[i]
                 if self.__heap[i] < self.__heap[bigger_child]:
                       snake_case__					:      Tuple  			=						self.__heap[bigger_child]
                       snake_case__					:      int  			=						temporary
                 snake_case__					:      int  			=						bigger_child





     def  _lowerCAmelCase			(    self    :				Union[str, Any] ):
           snake_case__					:      Any  			=						self.__heap[1]
           snake_case__					:      List[str]  			=						self.__heap[self.__size]
           self.__size -= 1
           self.__heap.pop()
           self.__swap_down(1 )
           return max_value





     @property
     def  _lowerCAmelCase			(    self    :				Union[str, Any] ):
           return self.__heap[1:]





     def __len__(    self    :				int ):
           return self.__size


if __name__ == "__main__":
      import doctest

      doctest.testmod()
      # create an instance of BinaryHeap
      A_ 			=		BinaryHeap()
      binary_heap.insert(6)
      binary_heap.insert(10)
      binary_heap.insert(15)
      binary_heap.insert(12)
      # pop root(max-values because it is max heap)
      print(binary_heap.pop())  # 15
      print(binary_heap.pop())  # 12
      # get the list and size after operations
      print(binary_heap.get_list)
      print(len(binary_heap))
