






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





def       __lowerCAmelCase      (						__snake_case       ):

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

     __lowerCAmelCase								=					precision
     __lowerCAmelCase								=					ceil(precision / 14       )
     __lowerCAmelCase								=					42_6880 * Decimal(1_0005       ).sqrt()
     __lowerCAmelCase								=					1
     __lowerCAmelCase								=					1359_1409
     __lowerCAmelCase								=					Decimal(__snake_case       )
     for k in range(1					, __snake_case       ):
          __lowerCAmelCase								=					factorial(6 * k       ) // (factorial(3 * k       ) * factorial(__snake_case       ) ** 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__":
 lowerCamelCase			:					Optional[Any]         =	50
 print(F'''The first {n} digits of pi is: {pi(n)}''')







def       __lowerCAmelCase      (						__snake_case					, __snake_case       ):
     if not isinstance(__snake_case					, __snake_case       ):
          raise ValueError("iterations must be defined as integers"       )
     if not isinstance(__snake_case					, __snake_case       ) or not number >= 1:
          raise ValueError(
              "starting number must be\n                         and integer and be more than 0"       )
     if not iterations >= 1:
          raise ValueError("Iterations must be done more than 0 times to play FizzBuzz"       )

     __lowerCAmelCase								=					""
     while number <= iterations:
          if number % 3 == 0:
               out += "Fizz"
          if number % 5 == 0:
               out += "Buzz"
          if 0 not in (number % 3, number % 5):
               out += str(__snake_case       )

          # print(out)
          number += 1
          out += " "
     return out


if __name__ == "__main__":
 import doctest

 doctest.testmod()






