
'''simple docstring'''

import unittest
from timeit import timeit


def 	_UpperCAmelCase				(  _lowerCamelCase						:       int  ,      _lowerCamelCase						:       int		)    ->						int:
  _lowerCAmelCase       :  List[str]   				=					first_num if first_num >= second_num else second_num
  _lowerCAmelCase       :  Dict   				=					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:
  _lowerCAmelCase       :  Dict   				=					(
      """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   a_  (unittest.TestCase    ):
       __lowerCAmelCase    :				List[str]    =      (
           (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    :				Optional[int]    =      (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 							__UpperCamelCase       (     self  ):
         for i, (first_num, second_num) in enumerate(self.test_inputs  ):
           _lowerCAmelCase       :  Tuple   				=					least_common_multiple_slow(snake_case_   ,   snake_case_  )
           _lowerCAmelCase       :  Union[str, Any]   				=					least_common_multiple_fast(snake_case_   ,   snake_case_  )
           with self.subTest(i=snake_case_  ):
             self.assertEqual(snake_case_   ,   self.expected_results[i]  )
             self.assertEqual(snake_case_   ,   self.expected_results[i]  )


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




'''simple docstring'''

import random


class   a_  :




       def __init__(     self   ,   snake_case_   ,   snake_case_  ):
         _lowerCAmelCase       :  List[str]   				=					x
         _lowerCAmelCase       :  List[str]   				=					y




       def 							__UpperCamelCase       (     self  ):
         return (self.x**2 + self.y**2) <= 1







       @classmethod
       def 							__UpperCamelCase       (     cls  ):
         return cls(x=random.random()   ,   y=random.random()  )



def 	_UpperCAmelCase				(  _lowerCamelCase						:       int		)    ->						float:
  if number_of_simulations < 1:
    raise ValueError("""At least one simulation is necessary to estimate PI."""		)

  _lowerCAmelCase       :  Tuple   				=					0
  for _ in range(_lowerCamelCase		):
    _lowerCAmelCase       :  Union[str, Any]   				=					Point.random_unit_square()

    if random_point.is_in_unit_circle():
      number_in_unit_circle += 1

  return 4 * number_in_unit_circle / number_of_simulations


if __name__ == "__main__":
     # import doctest

     # doctest.testmod()
     from math import pi

     UpperCamelCase_     			=       """Please enter the desired number of Monte Carlo simulations: """
     UpperCamelCase_     			=       estimate_pi(int(input(prompt).strip()))
     print(F'An estimate of PI is {my_pi} with an error of {abs(my_pi - pi)}')


