

"""simple docstring"""






import unittest
from timeit import timeit
def       UpperCamelCase					(			_lowerCAmelCase     :						int,  _lowerCAmelCase     :						int )				->			int:
	_UpperCAmelCase    :							Dict									=					first_num if first_num >= second_num else second_num
	_UpperCAmelCase    :							int									=					max_num
	while (common_mult % first_num > 0) or (common_mult % second_num > 0):
		common_mult += max_num
	return common_mult
def       UpperCamelCase					(			_lowerCAmelCase     :						int,  _lowerCAmelCase     :						int )				->			int:
	return b if a == 0 else greatest_common_divisor(b % a,  _lowerCAmelCase )
def       UpperCamelCase					(			_lowerCAmelCase     :						int,  _lowerCAmelCase     :						int )				->			int:
	return first_num // greatest_common_divisor(_lowerCAmelCase,  _lowerCAmelCase ) * second_num
def       UpperCamelCase					(			)				->			str:
	_UpperCAmelCase    :							str									=					(
	    """from __main__ import least_common_multiple_slow, least_common_multiple_fast"""
	)
	print(
	    """least_common_multiple_slow():""",  timeit("""least_common_multiple_slow(1000, 999)""",  setup=_lowerCAmelCase ),  )
	print(
	    """least_common_multiple_fast():""",  timeit("""least_common_multiple_fast(1000, 999)""",  setup=_lowerCAmelCase ),  )






class     _UpperCAmelCase			(		unittest.TestCase):
			__a :       Dict									=							(
			    (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),
			)
			__a :       Optional[Any]									=							(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 							__snake_case (		self     )    ->    Any:






				'''simple docstring'''







				for i, (first_num, second_num) in enumerate(self.test_inputs     ):
					_UpperCAmelCase    :							Optional[Any]									=					least_common_multiple_slow(_A      ,		_A     )
					_UpperCAmelCase    :							List[Any]									=					least_common_multiple_fast(_A      ,		_A     )
					with self.subTest(i=_A     ):
						self.assertEqual(_A      ,		self.expected_results[i]     )
						self.assertEqual(_A      ,		self.expected_results[i]     )


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








"""simple docstring"""






from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


lowerCamelCase__				:  Union[str, Any]													=  {
    '''configuration_dpr''': ['''DPR_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''DPRConfig'''],
    '''tokenization_dpr''': [
        '''DPRContextEncoderTokenizer''',
        '''DPRQuestionEncoderTokenizer''',
        '''DPRReaderOutput''',
        '''DPRReaderTokenizer''',
    ],
}


try:
						if not is_tokenizers_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						lowerCamelCase__				:  List[Any]													=  [
						    '''DPRContextEncoderTokenizerFast''',
						    '''DPRQuestionEncoderTokenizerFast''',
						    '''DPRReaderTokenizerFast''',
						]

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						lowerCamelCase__				:  Dict													=  [
						    '''DPR_CONTEXT_ENCODER_PRETRAINED_MODEL_ARCHIVE_LIST''',
						    '''DPR_QUESTION_ENCODER_PRETRAINED_MODEL_ARCHIVE_LIST''',
						    '''DPR_READER_PRETRAINED_MODEL_ARCHIVE_LIST''',
						    '''DPRContextEncoder''',
						    '''DPRPretrainedContextEncoder''',
						    '''DPRPreTrainedModel''',
						    '''DPRPretrainedQuestionEncoder''',
						    '''DPRPretrainedReader''',
						    '''DPRQuestionEncoder''',
						    '''DPRReader''',
						]

try:
						if not is_tf_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						lowerCamelCase__				:  Any													=  [
						    '''TF_DPR_CONTEXT_ENCODER_PRETRAINED_MODEL_ARCHIVE_LIST''',
						    '''TF_DPR_QUESTION_ENCODER_PRETRAINED_MODEL_ARCHIVE_LIST''',
						    '''TF_DPR_READER_PRETRAINED_MODEL_ARCHIVE_LIST''',
						    '''TFDPRContextEncoder''',
						    '''TFDPRPretrainedContextEncoder''',
						    '''TFDPRPretrainedQuestionEncoder''',
						    '''TFDPRPretrainedReader''',
						    '''TFDPRQuestionEncoder''',
						    '''TFDPRReader''',
						]


if TYPE_CHECKING:
						from .configuration_dpr import DPR_PRETRAINED_CONFIG_ARCHIVE_MAP, DPRConfig
						from .tokenization_dpr import (
						    DPRContextEncoderTokenizer,
						    DPRQuestionEncoderTokenizer,
						    DPRReaderOutput,
						    DPRReaderTokenizer,
						)

						try:
												if not is_tokenizers_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .tokenization_dpr_fast import (
												    DPRContextEncoderTokenizerFast,
												    DPRQuestionEncoderTokenizerFast,
												    DPRReaderTokenizerFast,
												)

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_dpr import (
												    DPR_CONTEXT_ENCODER_PRETRAINED_MODEL_ARCHIVE_LIST,
												    DPR_QUESTION_ENCODER_PRETRAINED_MODEL_ARCHIVE_LIST,
												    DPR_READER_PRETRAINED_MODEL_ARCHIVE_LIST,
												    DPRContextEncoder,
												    DPRPretrainedContextEncoder,
												    DPRPreTrainedModel,
												    DPRPretrainedQuestionEncoder,
												    DPRPretrainedReader,
												    DPRQuestionEncoder,
												    DPRReader,
												)

						try:
												if not is_tf_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_tf_dpr import (
												    TF_DPR_CONTEXT_ENCODER_PRETRAINED_MODEL_ARCHIVE_LIST,
												    TF_DPR_QUESTION_ENCODER_PRETRAINED_MODEL_ARCHIVE_LIST,
												    TF_DPR_READER_PRETRAINED_MODEL_ARCHIVE_LIST,
												    TFDPRContextEncoder,
												    TFDPRPretrainedContextEncoder,
												    TFDPRPretrainedQuestionEncoder,
												    TFDPRPretrainedReader,
												    TFDPRQuestionEncoder,
												    TFDPRReader,
												)

else:
						import sys

						lowerCamelCase__				:  Optional[Any]													=  _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)





