
from __future__ import annotations





def 							_lowerCamelCase			(					lowerCamelCase_:  str				,	lowerCamelCase_:  Optional[int]				,	lowerCamelCase_:  List[Any]				,	lowerCamelCase_:  str		):



				'''simple docstring'''







				if counter == 0 or capacity == 0:
								return 0

				# If weight of the nth item is more than Knapsack of capacity,
				#   then this item cannot be included in the optimal solution,
				# else return the maximum of two cases:
				#   (1) nth item included
				#   (2) not included
				if weights[counter - 1] > capacity:
								return knapsack(lowerCamelCase_				,	lowerCamelCase_				,	lowerCamelCase_				,	counter - 1		)
				else:
								A     :  str   =				capacity - weights[counter - 1]
								A     :  Tuple   =				values[counter - 1] + knapsack(
								    lowerCamelCase_				,	lowerCamelCase_				,	lowerCamelCase_				,	counter - 1		)
								A     :  Union[str, Any]   =				knapsack(lowerCamelCase_				,	lowerCamelCase_				,	lowerCamelCase_				,	counter - 1		)
								return max(lowerCamelCase_				,	lowerCamelCase_		)


if __name__ == "__main__":
					import doctest

					doctest.testmod()

def 							_lowerCamelCase			(					lowerCamelCase_:  int		):



				'''simple docstring'''







				if not isinstance(lowerCamelCase_				,	lowerCamelCase_		):
								raise ValueError('''double_factorial() only accepts integral values'''		)
				if num < 0:
								raise ValueError('''double_factorial() not defined for negative values'''		)
				A     :  int   =				1
				for i in range(lowerCamelCase_				,	0				,	-2		):
								value *= i
				return value


if __name__ == "__main__":
					import doctest

					doctest.testmod()