


import unittest
from timeit import timeit







def 	A (		A__		,		A__			):
     UpperCAmelCase    :					Dict			=      first_num if first_num >= second_num else second_num
     UpperCAmelCase    :					Optional[Any]			=      max_num
     while (common_mult % first_num > 0) or (common_mult % second_num > 0):
          common_mult += max_num
     return common_mult







def 	A (		A__		,		A__			):
     return b if a == 0 else greatest_common_divisor(b % a		,		A__			)







def 	A (		A__		,		A__			):
     return first_num // greatest_common_divisor(A__		,		A__			) * second_num







def 	A (		):
     UpperCAmelCase    :					int			=      (
         "from __main__ import least_common_multiple_slow, least_common_multiple_fast"
     )
     print(
         "least_common_multiple_slow():"		,		timeit("least_common_multiple_slow(1000, 999)"		,		setup=A__			)		,		)
     print(
         "least_common_multiple_fast():"		,		timeit("least_common_multiple_fast(1000, 999)"		,		setup=A__			)		,		)




class  A_ (			unittest.TestCase  ):







 """simple docstring"""





 _UpperCamelCase					:			int     	=       (
     (10, 20),
     (13, 15),
     (4, 31),
     (10, 42),
     (43, 34),
     (5, 12),
     (12, 25),
     (10, 25),
     (6, 9),
 )
 _UpperCamelCase					:			List[str]     	=       (20, 195, 124, 210, 1_462, 60, 300, 50, 18)
 def 	_UpperCamelCase     (      self       :			Optional[int]					)     ->      str:
      for i, (first_num, second_num) in enumerate(self.test_inputs					):
           UpperCAmelCase    :					Optional[int]			=      least_common_multiple_slow(_a							,     _a					)
           UpperCAmelCase    :					Union[str, Any]			=      least_common_multiple_fast(_a							,     _a					)
           with self.subTest(i=_a					):
                self.assertEqual(_a							,     self.expected_results[i]					)
                self.assertEqual(_a							,     self.expected_results[i]					)


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







from __future__ import annotations







def 	A (		A__		,		A__		,		A__		,		A__			):

     # Base Case
     if counter == 0 or capacity == 0:
          return 0

     # If weight of the nth item is more than Knapsack of capacity,
     #   then this item cannot be included in the optimal solution,
     # else return the maximum of two cases:
     #   (1) nth item included
     #   (2) not included
     if weights[counter - 1] > capacity:
          return knapsack(A__		,		A__		,		A__		,		counter - 1			)
     else:
          UpperCAmelCase    :					List[str]			=      capacity - weights[counter - 1]
          UpperCAmelCase    :					Tuple			=      values[counter - 1] + knapsack(
              A__		,		A__		,		A__		,		counter - 1			)
          UpperCAmelCase    :					Optional[int]			=      knapsack(A__		,		A__		,		A__		,		counter - 1			)
          return max(A__		,		A__			)


if __name__ == "__main__":
      import doctest

      doctest.testmod()



