


"""simple docstring"""



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







def   __lowerCAmelCase						(						lowercase  :  int			)     ->						str:


    """simple docstring"""





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

    snake_case   :				Tuple				 =   precision
    snake_case   :				int				 =   ceil(precision / 14			)
    snake_case   :				Any				 =   42_6880 * Decimal(1_0005			).sqrt()
    snake_case   :				Optional[Any]				 =   1
    snake_case   :				List[str]				 =   1359_1409
    snake_case   :				Any				 =   Decimal(lowercase			)
    for k in range(1						,							lowercase			):
        snake_case   :				Any				 =   factorial(6 * k			) // (factorial(3 * k			) * factorial(lowercase			) ** 3)
        linear_term += 5_4514_0134
        exponential_term *= -26_2537_4126_4076_8000
        partial_sum += Decimal(multinomial_term * linear_term			) / exponential_term
    return str(constant_term / partial_sum			)[:-1]


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









"""simple docstring"""



def   __lowerCAmelCase						(						lowercase  :  int			)     ->						int:


    """simple docstring"""





    if not isinstance(lowercase						,							lowercase			):
        raise ValueError("Input must be an integer"			)
    if input_num <= 0:
        raise ValueError("Input must be positive"			)
    return sum(
        divisor for divisor in range(1						,							input_num // 2 + 1			) if input_num % divisor == 0			)


if __name__ == "__main__":
  import doctest

  doctest.testmod()





