"""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 __future__ import annotations


def 					a__ (						UpperCAmelCase__    :     int     )->		list[int]:
						assert (
						    isinstance(UpperCAmelCase__						,     UpperCAmelCase__     ) and mask > 0
						), f'mask needs to be positive integer, your input {mask}'
						UpperCAmelCase__   		=						[]
						UpperCAmelCase__   		=						mask

						while submask:
												all_submasks.append(UpperCAmelCase__     )
												UpperCAmelCase__   		=						(submask - 1) & mask

						return all_submasks


if __name__ == "__main__":
						import doctest

						doctest.testmod()

