

'''simple docstring'''

import unittest
from timeit import timeit

def      __magic_name__							(			A       , A				)      ->		int:
	snake_case							=					first_num if first_num >= second_num else second_num
	snake_case							=					max_num
	while (common_mult % first_num > 0) or (common_mult % second_num > 0):
		common_mult += max_num
	return common_mult

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

def      __magic_name__							(			A       , A				)      ->		int:
	return first_num // greatest_common_divisor(A       , A				) * second_num

def      __magic_name__							(			)      ->		Any:
	snake_case							=					(
	    '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 lowerCamelCase   (    unittest.TestCase				):
				snake_case_							     = (
				    (10, 20),
				    (13, 15),
				    (4, 31),
				    (10, 42),
				    (43, 34),
				    (5, 12),
				    (12, 25),
				    (10, 25),
				    (6, 9),
				)
				snake_case_							     = (20, 195, 124, 210, 1462, 60, 300, 50, 18)

				def 					_lowerCamelCase    (       self )    ->							Optional[Any]:
					for i, (first_num, second_num) in enumerate(self.test_inputs ):
						snake_case							=					least_common_multiple_slow(lowercase_,						lowercase_ )
						snake_case							=					least_common_multiple_fast(lowercase_,						lowercase_ )
						with self.subTest(i=lowercase_ ):
							self.assertEqual(lowercase_,						self.expected_results[i] )
							self.assertEqual(lowercase_,						self.expected_results[i] )


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








'''simple docstring'''

def      __magic_name__							(			A				)      ->		tuple[int, int]:
	# base case
	if len(A				) == 1:
		return a[0], a[0]
	else:
		# split A into half.
		snake_case							=					a[: len(A				) // 2]
		snake_case							=					a[len(A				) // 2 :]

		# 2 sub problems, 1/2 of original size.
		snake_case			,			snake_case							=					max_difference(A				)
		snake_case			,			snake_case							=					max_difference(A				)

		# get min of first and max of second
		# linear time
		snake_case							=					min(A				)
		snake_case							=					max(A				)

		# 3 cases, either (small1, big1),
		# (min_first, max_second), (small2, big2)
		# constant comparisons
		if biga - smalla > max_second - min_first and biga - smalla > biga - smalla:
			return smalla, biga
		elif biga - smalla > max_second - min_first:
			return smalla, biga
		else:
			return min_first, max_second


if __name__ == "__main__":
						import doctest

						doctest.testmod()





