



"""simple docstring"""







from collections.abc import Callable

UpperCAmelCase:   str       			=							Callable[[float], float]  # type alias for a real -> real function


def       __SCREAMING_SNAKE_CASE      (   __UpperCAmelCase					,							__UpperCAmelCase					,							__UpperCAmelCase					,							):
		_lowercase							:      Union[str, Any]			=					float(__UpperCAmelCase	)
		while True:
				try:
						_lowercase							:      Union[str, Any]			=					prev_guess - function(__UpperCAmelCase	) / derivative(__UpperCAmelCase	)
				except ZeroDivisionError:
						raise ZeroDivisionError("""Could not find root"""	) from None
				if abs(prev_guess - next_guess	) < 10**-5:
						return next_guess
				_lowercase							:      Any			=					next_guess


def       __SCREAMING_SNAKE_CASE      (   __UpperCAmelCase	):
		return (x**3) - (2 * x) - 5


def       __SCREAMING_SNAKE_CASE      (   __UpperCAmelCase	):
		return 3 * (x**2) - 2


if __name__ == "__main__":
		print(newton(f, fa, 3))








"""simple docstring"""







from itertools import combinations_with_replacement


def       __SCREAMING_SNAKE_CASE      (   __UpperCAmelCase = 100	):
		_lowercase							:      list[int]			=					[*list(range(1					,							21	)	), 25]
		_lowercase							:      list[int]			=					[2 * x for x in range(1					,							21	)] + [50]
		_lowercase							:      list[int]			=					[3 * x for x in range(1					,							21	)]
		_lowercase							:      list[int]			=					singles + doubles + triples + [0]

		_lowercase							:      int			=					0
		_lowercase							:      int
		_lowercase							:      int
		_lowercase							:      int
		_lowercase							:      int

		for double in doubles:
				for throwa, throwa in combinations_with_replacement(__UpperCAmelCase					,							2	):
						_lowercase							:      Union[str, Any]			=					double + throwa + throwa
						if checkout_total < limit:
								num_checkouts += 1

		return num_checkouts


if __name__ == "__main__":
		print(F'{solution() = }')



