
'''simple docstring'''





import unittest
from timeit import timeit





def 							snake_case				(		UpperCAmelCase   ,	UpperCAmelCase						)->      int:







      """simple docstring"""
      __A													=      first_num if first_num >= second_num else second_num
      __A													=      max_num
      while (common_mult % first_num > 0) or (common_mult % second_num > 0):
            common_mult += max_num
      return common_mult





def 							snake_case				(		UpperCAmelCase   ,	UpperCAmelCase						)->      int:







      """simple docstring"""
      return b if a == 0 else greatest_common_divisor(b % a   ,	UpperCAmelCase						)





def 							snake_case				(		UpperCAmelCase   ,	UpperCAmelCase						)->      int:







      """simple docstring"""
      return first_num // greatest_common_divisor(UpperCAmelCase   ,	UpperCAmelCase						) * second_num





def 							snake_case				(		)->      Any:







      """simple docstring"""
      __A													=      (
          '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):
 UpperCAmelCase__     :     Any    					=       (
     (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),
 )
 UpperCAmelCase__     :     Dict    					=       (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 						lowercase_    (      self	:List[str]      )					->      List[str]:







       '''simple docstring'''



       for i, (first_num, second_num) in enumerate(self.test_inputs      ):
             __A													=      least_common_multiple_slow(_A						,					_A      )
             __A													=      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'''





import os
import unittest

import pytest
from parameterized import parameterized

from transformers.testing_utils import require_torch, require_torch_gpu, slow, torch_device


# skipping in unittest tests

a__		: Tuple  							=							[(1,)]





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







      """simple docstring"""
      __A													=      bool(os.getenv('RUN_SLOW'   ,	0						)						)
      if run_slow:
            assert True
      else:
            assert False, "should have been skipped"





def 							snake_case				(		)->      Tuple:







      """simple docstring"""
      __A													=      bool(os.getenv('RUN_SLOW'   ,	0						)						)
      if run_slow and torch_device == "cuda":
            assert True
      else:
            assert False, "should have been skipped"


@require_torch
class 			UpperCamelCase__	(     unittest.TestCase):






 @slow
 @require_torch_gpu
 def 						lowercase_    (      self	:Dict      )					->      List[Any]:







       '''simple docstring'''



       check_slow_torch_cuda()






 @require_torch_gpu
 @slow
 def 						lowercase_    (      self	:int      )					->      int:







       '''simple docstring'''



       check_slow_torch_cuda()






 @parameterized.expand(_A      )
 @slow
 def 						lowercase_    (      self	:Dict						,					_A	:Union[str, Any]=None      )					->      Dict:







       '''simple docstring'''



       check_slow()





@slow
@require_torch_gpu
def 							snake_case				(		)->      Optional[int]:







      """simple docstring"""
      check_slow_torch_cuda()





@require_torch_gpu
@slow
def 							snake_case				(		)->      List[str]:







      """simple docstring"""
      check_slow_torch_cuda()





@slow
@pytest.mark.parametrize('param'   ,	[1]						)
def 							snake_case				(		UpperCAmelCase						)->      int:







      """simple docstring"""
      check_slow()





@pytest.mark.parametrize('param'   ,	[1]						)
@slow
def 							snake_case				(		UpperCAmelCase						)->      Any:







      """simple docstring"""
      check_slow()






