"""simple docstring"""







import unittest
from timeit import timeit


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


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


def 					a__ (						UpperCAmelCase__    :     int						,     UpperCAmelCase__    :     int							)->		int:
						return first_num // greatest_common_divisor(UpperCAmelCase__						,     UpperCAmelCase__							) * second_num


def 					a__ (						)->		List[str]:
						UpperCAmelCase__   		=						(
						    """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      _lowercase						(				unittest.TestCase					):
				lowerCamelCase__									=    (
				    (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),
				)
				lowerCamelCase__									=    (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    :      Optional[Any]       ):


										'''simple docstring'''
										for i, (first_num, second_num) in enumerate(self.test_inputs       ):
																UpperCAmelCase__   		=						least_common_multiple_slow(_lowercase    ,      _lowercase       )
																UpperCAmelCase__   		=						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"""







from collections import namedtuple

UpperCamelCase_    :    Any											=						namedtuple("""from_to""", """from_ to""")

UpperCamelCase_    :    Union[str, Any]											=						{
    """millimeter""": """mm""",
    """centimeter""": """cm""",
    """meter""": """m""",
    """kilometer""": """km""",
    """inch""": """in""",
    """inche""": """in""",  # Trailing 's' has been stripped off
    """feet""": """ft""",
    """foot""": """ft""",
    """yard""": """yd""",
    """mile""": """mi""",
}

UpperCamelCase_    :    str											=						{
    """mm""": from_to(0.001, 1000),
    """cm""": from_to(0.01, 100),
    """m""": from_to(1, 1),
    """km""": from_to(1000, 0.001),
    """in""": from_to(0.0254, 39.3701),
    """ft""": from_to(0.3048, 3.2_8084),
    """yd""": from_to(0.9144, 1.0_9361),
    """mi""": from_to(1609.34, 0.0_0062_1371),
}


def 					a__ (						UpperCAmelCase__    :     float						,     UpperCAmelCase__    :     str						,     UpperCAmelCase__    :     str     )->		float:
						UpperCAmelCase__   		=						from_type.lower().rstrip("""s"""     )
						UpperCAmelCase__   		=						TYPE_CONVERSION.get(UpperCAmelCase__						,     UpperCAmelCase__     )
						UpperCAmelCase__   		=						to_type.lower().rstrip("""s"""     )
						UpperCAmelCase__   		=						TYPE_CONVERSION.get(UpperCAmelCase__						,     UpperCAmelCase__     )
						if new_from not in METRIC_CONVERSION:
												UpperCAmelCase__   		=						(
												    f'Invalid \'from_type\' value: {from_type!r}.\n'
												    f'Conversion abbreviations are: {", ".join(UpperCAmelCase__     )}'
												)
												raise ValueError(UpperCAmelCase__     )
						if new_to not in METRIC_CONVERSION:
												UpperCAmelCase__   		=						(
												    f'Invalid \'to_type\' value: {to_type!r}.\n'
												    f'Conversion abbreviations are: {", ".join(UpperCAmelCase__     )}'
												)
												raise ValueError(UpperCAmelCase__     )
						return value * METRIC_CONVERSION[new_from].from_ * METRIC_CONVERSION[new_to].to


if __name__ == "__main__":
						import doctest

						doctest.testmod()

