

"""simple docstring"""




from __future__ import annotations

import math

def      snake_case__      (   SCREAMING_SNAKE_CASE_		:   int     ,					SCREAMING_SNAKE_CASE_		:   int     ,					SCREAMING_SNAKE_CASE_		:   bool     ,					SCREAMING_SNAKE_CASE_		:   list[int]     ,					SCREAMING_SNAKE_CASE_		:   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      snake_case__      (   ):



     '''simple docstring'''





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


if __name__ == "__main__":
       import doctest

       doctest.testmod()
       main()




from __future__ import annotations

import math

def      snake_case__      (   SCREAMING_SNAKE_CASE_		:   int      ):



     '''simple docstring'''





     if 1 < number < 4:
          # 2 and 3 are primes
          return True
     elif number < 2 or number % 2 == 0 or number % 3 == 0:
          # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
          return False

     # All primes number are in format of 6k +/- 1
     for i in range(5     ,					int(math.sqrt(SCREAMING_SNAKE_CASE_      ) + 1      )     ,					6      ):
          if number % i == 0 or number % (i + 2) == 0:
               return False
     return True

def      snake_case__      (   SCREAMING_SNAKE_CASE_		:   int      ):



     '''simple docstring'''





     lowercase__   :       int				=	str(SCREAMING_SNAKE_CASE_      )
     lowercase__   :       Union[str, Any]				=	[n]
     for i in range(1     ,					len(SCREAMING_SNAKE_CASE_      )      ):
          list_nums.append(int(str_num[i:]      )      )
          list_nums.append(int(str_num[:-i]      )      )
     return list_nums

def      snake_case__      (   SCREAMING_SNAKE_CASE_		:   int      ):



     '''simple docstring'''





     if len(str(SCREAMING_SNAKE_CASE_      )      ) > 3:
          if not is_prime(int(str(SCREAMING_SNAKE_CASE_      )[-3:]      )      ) or not is_prime(int(str(SCREAMING_SNAKE_CASE_      )[:3]      )      ):
               return False
     return True

def      snake_case__      (   SCREAMING_SNAKE_CASE_		:   int = 11      ):



     '''simple docstring'''





     lowercase__   :       list[int]				=	[]
     lowercase__   :       Tuple				=	13
     while len(SCREAMING_SNAKE_CASE_      ) != count:
          if validate(SCREAMING_SNAKE_CASE_      ):
               lowercase__   :       Optional[int]				=	list_truncated_nums(SCREAMING_SNAKE_CASE_      )
               if all(is_prime(SCREAMING_SNAKE_CASE_      ) for i in list_nums      ):
                    list_truncated_primes.append(SCREAMING_SNAKE_CASE_      )
          num += 2
     return list_truncated_primes

def      snake_case__      (   ):



     '''simple docstring'''





     return sum(compute_truncated_primes(11      )      )


if __name__ == "__main__":
       print(F'''{sum(compute_truncated_primes(11)) = }''')

