

"""simple docstring"""




from decimal import Decimal, getcontext
from math import ceil, factorial
def   lowerCAmelCase						(					__UpperCamelCase      ):
 '''simple docstring'''





 if not isinstance(__UpperCamelCase							,    __UpperCamelCase      ):
  raise TypeError("""Undefined for non-integers"""      )
 elif precision < 1:
  raise ValueError("""Undefined for non-natural numbers"""      )

 UpperCAmelCase__					:  str					   =					precision
 UpperCAmelCase__					:  List[Any]					   =					ceil(precision / 14      )
 UpperCAmelCase__					:  List[str]					   =					426880 * Decimal(10005      ).sqrt()
 UpperCAmelCase__					:  List[Any]					   =					1
 UpperCAmelCase__					:  List[Any]					   =					13591409
 UpperCAmelCase__					:  Optional[int]					   =					Decimal(__UpperCamelCase      )
 for k in range(1							,    __UpperCamelCase      ):
  UpperCAmelCase__					:  Any					   =					factorial(6 * k      ) // (factorial(3 * k      ) * factorial(__UpperCamelCase      ) ** 3)
  linear_term += 545140134
  exponential_term *= -262537412640768000
  partial_sum += Decimal(multinomial_term * linear_term      ) / exponential_term
 return str(constant_term / partial_sum      )[:-1]


if __name__ == "__main__":
      __UpperCAmelCase =				50
      print(F"The first {n} digits of pi is: {pi(n)}")








"""simple docstring"""




__UpperCAmelCase =				'Tobias Carryer'

from time import time







class      __lowercase			:

  def __init__(  self		:			Union[str, Any]					,A		:			Dict					,A		:			Optional[int]					,A		:			Union[str, Any]					,A		:			int=int(time()    )    ):  # noqa: B008






   '''simple docstring'''
   UpperCAmelCase__					:  int					   =					multiplier
   UpperCAmelCase__					:  Union[str, Any]					   =					increment
   UpperCAmelCase__					:  Dict					   =					modulo
   UpperCAmelCase__					:  Tuple					   =					seed




  def    __lowercase       (  self		:			Dict    ):






   '''simple docstring'''
   UpperCAmelCase__					:  Any					   =					(self.multiplier * self.seed + self.increment) % self.modulo
   return self.seed


if __name__ == "__main__":
      # Show the LCG in action.
      __UpperCAmelCase =				LinearCongruentialGenerator(166_4525, 10_1390_4223, 2 << 31)
      while True:
            print(lcg.next_number())





