
import unittest
from timeit import timeit




def 		A_	(							snake_case							:				int	, snake_case							:				int	) ->      int:



						'''simple docstring'''

						__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_	(							snake_case							:				int	, snake_case							:				int	) ->      int:



						'''simple docstring'''

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




def 		A_	(							snake_case							:				int	, snake_case							:				int	) ->      int:



						'''simple docstring'''

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




def 		A_	(							) ->      Tuple:



						'''simple docstring'''

						__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=snake_case	)	, )
						print(
						    '''least_common_multiple_fast():'''	, timeit('''least_common_multiple_fast(1000, 999)'''	, setup=snake_case	)	, )






class     SCREAMING_SNAKE_CASE__      (							unittest.TestCase      ):

							"""simple docstring"""






							_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       A__						(					self     )->				Union[str, Any]:





													'''simple docstring'''






													for i, (first_num, second_num) in enumerate(self.test_inputs     ):
																			__UpperCamelCase       					=     least_common_multiple_slow(SCREAMING_SNAKE_CASE_       ,		SCREAMING_SNAKE_CASE_     )
																			__UpperCamelCase       					=     least_common_multiple_fast(SCREAMING_SNAKE_CASE_       ,		SCREAMING_SNAKE_CASE_     )
																			with self.subTest(i=SCREAMING_SNAKE_CASE_     ):
																									self.assertEqual(SCREAMING_SNAKE_CASE_       ,		self.expected_results[i]     )
																									self.assertEqual(SCREAMING_SNAKE_CASE_       ,		self.expected_results[i]     )


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






def 		A_	(							snake_case							:				Union[str, Any]	, snake_case							:				Tuple	, snake_case							:				Optional[Any]	) ->      Union[str, Any]:



						'''simple docstring'''

						assert b != 0, "This cannot accept modulo that is == 0"
						if n == 0:
												return 1

						if n % 2 == 1:
												return (bin_exp_mod(snake_case	, n - 1	, snake_case	) * a) % b

						__UpperCamelCase       					=     bin_exp_mod(snake_case	, n / 2	, snake_case	)
						return (r * r) % b


if __name__ == "__main__":
				try:
								lowercase__							:							Dict													=     int(input("Enter Base : ").strip())
								lowercase__							:							Dict													=     int(input("Enter Power : ").strip())
								lowercase__							:							Dict													=     int(input("Enter Modulo : ").strip())
				except ValueError:
								print("Invalid literal for integer")

				print(bin_exp_mod(BASE, POWER, MODULO))




