





from __future__ import annotations

import math







def       UpperCAmelCase							(     _lowerCamelCase      :  int			,   _lowerCamelCase      :  int			,   _lowerCamelCase      :  bool			,   _lowerCamelCase      :  list[int]			,   _lowerCamelCase      :  float     ):





						'''simple docstring'''


						if depth < 0:
												raise ValueError("Depth cannot be less than 0"     )

						if not scores:
												raise ValueError("Scores cannot be empty"     )

						if depth == height:
												return scores[node_index]

						return (
						    max(
						        minimax(depth + 1			,   node_index * 2			,   _lowerCamelCase			,   _lowerCamelCase			,   _lowerCamelCase     )			,   minimax(depth + 1			,   node_index * 2 + 1			,   _lowerCamelCase			,   _lowerCamelCase			,   _lowerCamelCase     )			,   )
						    if is_max
						    else min(
						        minimax(depth + 1			,   node_index * 2			,   _lowerCamelCase			,   _lowerCamelCase			,   _lowerCamelCase     )			,   minimax(depth + 1			,   node_index * 2 + 1			,   _lowerCamelCase			,   _lowerCamelCase			,   _lowerCamelCase     )			,   )
						)







def       UpperCAmelCase							(     ):





						'''simple docstring'''


						SCREAMING_SNAKE_CASE__     :				Optional[int]   =					[90, 23, 6, 33, 21, 65, 123, 34_423]
						SCREAMING_SNAKE_CASE__     :				List[Any]   =					math.log(len(_lowerCamelCase     )			,   2     )
						print(f"""Optimal value : {minimax(0			,   0			,   _lowerCamelCase			,   _lowerCamelCase			,   _lowerCamelCase     )}"""     )


if __name__ == "__main__":
				import doctest

				doctest.testmod()
				main()










def       UpperCAmelCase							(     _lowerCamelCase      :  int = 1_000     ):





						'''simple docstring'''


						SCREAMING_SNAKE_CASE__     :				Dict   =					-1
						SCREAMING_SNAKE_CASE__     :				str   =					0
						for a in range(1			,   n // 3     ):
												# Solving the two equations a**2+b**2=c**2 and a+b+c=N eliminating c
												SCREAMING_SNAKE_CASE__     :				Tuple   =					(n * n - 2 * a * n) // (2 * n - 2 * a)
												SCREAMING_SNAKE_CASE__     :				Dict   =					n - a - b
												if c * c == (a * a + b * b):
																		SCREAMING_SNAKE_CASE__     :				str   =					a * b * c
																		if candidate >= product:
																								SCREAMING_SNAKE_CASE__     :				List[str]   =					candidate
						return product


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