
'''simple docstring'''
import unittest
from timeit import timeit




def      __snake_case       (       lowerCamelCase_ :				int	,  lowerCamelCase_ :				int						):
				'''simple docstring'''




				__magic_name__	  = first_num if first_num >= second_num else second_num
				__magic_name__	  = max_num
				while (common_mult % first_num > 0) or (common_mult % second_num > 0):
								common_mult += max_num
				return common_mult




def      __snake_case       (       lowerCamelCase_ :				int	,  lowerCamelCase_ :				int						):
				'''simple docstring'''




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




def      __snake_case       (       lowerCamelCase_ :				int	,  lowerCamelCase_ :				int						):
				'''simple docstring'''




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




def      __snake_case       (       ):
				'''simple docstring'''




				__magic_name__	  = (
				    '''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   ):





						"""simple docstring"""




						UpperCAmelCase__	:       Any         =     (
						    (10, 20),
						    (13, 15),
						    (4, 31),
						    (10, 42),
						    (43, 34),
						    (5, 12),
						    (12, 25),
						    (10, 25),
						    (6, 9),
						)
						UpperCAmelCase__	:       Optional[int]         =     (20, 195, 124, 210, 1462, 60, 300, 50, 18)
						def 					__A					( self				:					Tuple  )							->					Tuple:
										for i, (first_num, second_num) in enumerate(self.test_inputs  ):
														__magic_name__	  = least_common_multiple_slow(_lowerCamelCase	,				_lowerCamelCase  )
														__magic_name__	  = 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      __snake_case       (       lowerCamelCase_ :				int						):
				'''simple docstring'''




				barcode //= 10  # exclude the last digit
				__magic_name__	  = False
				__magic_name__	  = 0

				# extract and check each digit
				while barcode != 0:
								__magic_name__	  = 1 if checker else 3
								s += mult * (barcode % 10)
								barcode //= 10
								__magic_name__	  = not checker

				return (10 - (s % 10)) % 10




def      __snake_case       (       lowerCamelCase_ :				int						):
				'''simple docstring'''




				return len(str(lowerCamelCase_						)						) == 13 and get_check_digit(lowerCamelCase_						) == barcode % 10




def      __snake_case       (       lowerCamelCase_ :				str						):
				'''simple docstring'''




				if str(lowerCamelCase_						).isalpha():
								__magic_name__	  = F'Barcode \'{barcode}\' has alphabetic characters.'
								raise ValueError(lowerCamelCase_						)
				elif int(lowerCamelCase_						) < 0:
								raise ValueError("The entered barcode has a negative value. Try again."						)
				else:
								return int(lowerCamelCase_						)


if __name__ == "__main__":
						import doctest

						doctest.testmod()
						__magic_name__   :   Optional[int]  							=get_barcode(input('Barcode: ').strip())

						if is_valid(barcode):
												print(F'''\'{barcode}\' is a valid barcode.''')
						else:
												print(F'''\'{barcode}\' is NOT a valid barcode.''')



