




'''simple docstring'''





import unittest
from timeit import timeit





def UpperCAmelCase						(					UpperCAmelCase_      ,  UpperCAmelCase_	):
				_a							:       Any       					=			first_num if first_num >= second_num else second_num
				_a							:       List[Any]       					=			max_num
				while (common_mult % first_num > 0) or (common_mult % second_num > 0):
								common_mult += max_num
				return common_mult





def UpperCAmelCase						(					UpperCAmelCase_      ,  UpperCAmelCase_	):
				return b if a == 0 else greatest_common_divisor(b % a      ,  UpperCamelCase__	)





def UpperCAmelCase						(					UpperCAmelCase_      ,  UpperCAmelCase_	):
				return first_num // greatest_common_divisor(UpperCamelCase__      ,  UpperCamelCase__	) * second_num





def UpperCAmelCase						(					):
				_a							:       Optional[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=UpperCamelCase__	)      ,  )
				print(
				    """least_common_multiple_fast():"""      ,  timeit("""least_common_multiple_fast(1000, 999)"""      ,  setup=UpperCamelCase__	)      ,  )




class     UpperCamelCase					(  unittest.TestCase					):
		a    :Tuple      					=				(
		    (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    :int      					=				(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 						a_       ( self   ):







						'''simple docstring'''


						for i, (first_num, second_num) in enumerate(self.test_inputs   ):
										_a							:       Optional[int]       					=			least_common_multiple_slow(__lowerCAmelCase		,    __lowerCAmelCase   )
										_a							:       List[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'''





def UpperCAmelCase						(					UpperCAmelCase_	):
    _a							:       List[Any]       					=			len(UpperCAmelCase_	)
    for cycle_start in range(0      ,  array_len - 1	):
        _a							:       int       					=			array[cycle_start]

        _a							:       int       					=			cycle_start
        for i in range(cycle_start + 1      ,  UpperCAmelCase_	):
            if array[i] < item:
                pos += 1

        if pos == cycle_start:
            continue

        while item == array[pos]:
            pos += 1

        _a					,   _a							:       List[str]       					=			item, array[pos]
        while pos != cycle_start:
            _a							:       Any       					=			cycle_start
            for i in range(cycle_start + 1      ,  UpperCAmelCase_	):
                if array[i] < item:
                    pos += 1

            while item == array[pos]:
                pos += 1

            _a					,   _a							:       List[Any]       					=			item, array[pos]

    return array


if __name__ == "__main__":
  assert cycle_sort([4, 5, 3, 2, 1]) == [1, 2, 3, 4, 5]
  assert cycle_sort([0, 1, -1_0, 1_5, 2, -2]) == [-1_0, -2, 0, 1, 2, 1_5]


