
import unittest
from timeit import timeit



def 	_a  (					__SCREAMING_SNAKE_CASE					:  int		,				__SCREAMING_SNAKE_CASE					:  int    ):






  """simple docstring"""




  _lowerCAmelCase						=		first_num if first_num >= second_num else second_num
  _lowerCAmelCase						=		max_num
  while (common_mult % first_num > 0) or (common_mult % second_num > 0):
    common_mult += max_num
  return common_mult



def 	_a  (					__SCREAMING_SNAKE_CASE					:  int		,				__SCREAMING_SNAKE_CASE					:  int    ):






  """simple docstring"""




  return b if a == 0 else greatest_common_divisor(b % a		,				lowerCamelCase_    )



def 	_a  (					__SCREAMING_SNAKE_CASE					:  int		,				__SCREAMING_SNAKE_CASE					:  int    ):






  """simple docstring"""




  return first_num // greatest_common_divisor(lowerCamelCase_		,				lowerCamelCase_    ) * second_num



def 	_a  (					):






  """simple docstring"""




  _lowerCAmelCase						=		(
      'from __main__ import least_common_multiple_slow, least_common_multiple_fast'
  )
  print(
      'least_common_multiple_slow():'		,				timeit('least_common_multiple_slow(1000, 999)'		,				setup=lowerCamelCase_    )		,				)
  print(
      'least_common_multiple_fast():'		,				timeit('least_common_multiple_fast(1000, 999)'		,				setup=lowerCamelCase_    )		,				)





class 						__lowercase(     unittest.TestCase   ):


       """simple docstring"""







       UpperCamelCase_				 =							(
           (10, 20),
           (13, 15),
           (4, 31),
           (10, 42),
           (43, 34),
           (5, 12),
           (12, 25),
           (10, 25),
           (6, 9),
       )
       UpperCamelCase_				 =							(20, 195, 124, 210, 1_462, 60, 300, 50, 18)



       def SCREAMING_SNAKE_CASE_				(     self					:			List[Any]       )					->   int:
         for i, (first_num, second_num) in enumerate(self.test_inputs       ):
           _lowerCAmelCase						=		least_common_multiple_slow(UpperCAmelCase__  ,      UpperCAmelCase__       )
           _lowerCAmelCase						=		least_common_multiple_fast(UpperCAmelCase__  ,      UpperCAmelCase__       )
           with self.subTest(i=UpperCAmelCase__       ):
             self.assertEqual(UpperCAmelCase__  ,      self.expected_results[i]       )
             self.assertEqual(UpperCAmelCase__  ,      self.expected_results[i]       )


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




"""simple docstring"""






def __lowercase  (   lowerCamelCase_	:   list	):
				if not isinstance(lowerCamelCase_    ,       lowerCamelCase_	):
								raise ValueError("Input series is not valid, valid series - [2, 4, 8]"	)
				if len(lowerCamelCase_	) == 0:
								raise ValueError("Input list must be a non empty list"	)
				if len(lowerCamelCase_	) == 1:
								return True
				try:
								SCREAMING_SNAKE_CASE__  				=					series[1] / series[0]
								for index in range(len(lowerCamelCase_	) - 1	):
												if series[index + 1] / series[index] != common_ratio:
																return False
				except ZeroDivisionError:
								return False
				return True


def __lowercase  (   lowerCamelCase_	:   list	):
				if not isinstance(lowerCamelCase_    ,       lowerCamelCase_	):
								raise ValueError("Input series is not valid, valid series - [2, 4, 8]"	)
				if len(lowerCamelCase_	) == 0:
								raise ValueError("Input list must be a non empty list"	)
				SCREAMING_SNAKE_CASE__  				=					1
				for value in series:
								answer *= value
				return pow(lowerCamelCase_    ,       1 / len(lowerCamelCase_	)	)


if __name__ == "__main__":
	import doctest

	doctest.testmod()
