



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



def 	__a					(   lowerCAmelCase_       : int    )				->			str:






						'''simple docstring'''



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

						UpperCAmelCase_=       precision
						UpperCAmelCase_=       ceil(precision / 14    )
						UpperCAmelCase_=       42_68_80 * Decimal(1_00_05    ).sqrt()
						UpperCAmelCase_=       1
						UpperCAmelCase_=       13_59_14_09
						UpperCAmelCase_=       Decimal(lowerCAmelCase_    )
						for k in range(1      ,lowerCAmelCase_    ):
												UpperCAmelCase_=       factorial(6 * k    ) // (factorial(3 * k    ) * factorial(lowerCAmelCase_    ) ** 3)
												linear_term += 5_45_14_01_34
												exponential_term *= -26_25_37_41_26_40_76_80_00
												partial_sum += Decimal(multinomial_term * linear_term    ) / exponential_term
						return str(constant_term / partial_sum    )[:-1]


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




from __future__ import annotations



def 	__a					(   lowerCAmelCase_       : list[int]      ,lowerCAmelCase_       : int    )				->			list[list[int]]:






						'''simple docstring'''



						UpperCAmelCase_=       []
						UpperCAmelCase_=       []
						UpperCAmelCase_=       0
						UpperCAmelCase_=       sum(lowerCAmelCase_    )
						create_state_space_tree(lowerCAmelCase_      ,lowerCAmelCase_      ,lowerCAmelCase_      ,lowerCAmelCase_      ,lowerCAmelCase_      ,lowerCAmelCase_    )
						return result



def 	__a					(   lowerCAmelCase_       : list[int]      ,lowerCAmelCase_       : int      ,lowerCAmelCase_       : int      ,lowerCAmelCase_       : list[int]      ,lowerCAmelCase_       : list[list[int]]      ,lowerCAmelCase_       : int      ,)				->			None:






						'''simple docstring'''



						if sum(lowerCAmelCase_    ) > max_sum or (remaining_nums_sum + sum(lowerCAmelCase_    )) < max_sum:
												return
						if sum(lowerCAmelCase_    ) == max_sum:
												result.append(lowerCAmelCase_    )
												return
						for index in range(lowerCAmelCase_      ,len(lowerCAmelCase_    )    ):
												create_state_space_tree(
												    lowerCAmelCase_      ,lowerCAmelCase_      ,index + 1      ,[*path, nums[index]]      ,lowerCAmelCase_      ,remaining_nums_sum - nums[index]      ,)
__A       =						[3, 34, 4, 12, 5, 2]
__A       =						9
__A       =						generate_sum_of_subsets_soln(nums, max_sum)



print(*result)




