



from decimal import Decimal, getcontext
from math import ceil, factorial

def      __lowercase(						UpperCAmelCase__			):


      """simple docstring"""



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

      lowerCamelCase             =		precision
      lowerCamelCase             =		ceil(precision / 14			)
      lowerCamelCase             =		426880 * Decimal(10005			).sqrt()
      lowerCamelCase             =		1
      lowerCamelCase             =		13591409
      lowerCamelCase             =		Decimal(UpperCAmelCase__			)
      for k in range(1 , UpperCAmelCase__			):
            lowerCamelCase             =		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__":
     a_    :  Dict						  =		5_0
     print(f"""The first {n} digits of pi is: {pi(n)}""")




from __future__ import annotations

def      __lowercase(						UpperCAmelCase__			):


      """simple docstring"""



      lowerCamelCase             =		2
      lowerCamelCase             =		[]
      while i * i <= n:
            if n % i:
                  i += 1
            else:
                  n //= i
                  factors.append(UpperCAmelCase__			)
      if n > 1:
            factors.append(UpperCAmelCase__			)
      return factors


if __name__ == "__main__":
     import doctest

     doctest.testmod()