






__a:     List[Any]   					=					[0, 2, 4, 6, 8]
__a:     Union[str, Any]   					=					[1, 3, 5, 7, 9]




def       _SCREAMING_SNAKE_CASE (							__snake_case   ,      __snake_case   ,      __snake_case   ,      __snake_case )				->						int:
       if remaining_length == 0:
              if digits[0] == 0 or digits[-1] == 0:
                     return 0

              for i in range(length // 2 - 1   ,      -1   ,      -1 ):
                     remainder += digits[i] + digits[length - i - 1]

                     if remainder % 2 == 0:
                            return 0

                     remainder //= 1_0

              return 1

       if remaining_length == 1:
              if remainder % 2 == 0:
                     return 0

              _UpperCAmelCase							=    0
              for digit in range(1_0 ):
                     _UpperCAmelCase							=    digit
                     result += reversible_numbers(
                         0   ,      (remainder + 2 * digit) // 1_0   ,      __snake_case   ,      __snake_case )
              return result

       _UpperCAmelCase							=    0
       for digita in range(1_0 ):
              _UpperCAmelCase							=    digita

              if (remainder + digita) % 2 == 0:
                     _UpperCAmelCase							=    ODD_DIGITS
              else:
                     _UpperCAmelCase							=    EVEN_DIGITS

              for digita in other_parity_digits:
                     _UpperCAmelCase							=    digita
                     result += reversible_numbers(
                         remaining_length - 2   ,      (remainder + digita + digita) // 1_0   ,      __snake_case   ,      __snake_case   ,      )
       return result




def       _SCREAMING_SNAKE_CASE (							__snake_case = 9 )				->						int:
       _UpperCAmelCase							=    0
       for length in range(1   ,      max_power + 1 ):
              result += reversible_numbers(__snake_case   ,      0   ,      [0] * length   ,      __snake_case )
       return result


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







from typing import Any

import numpy as np
def 		_a       ( a					:np.ndarray					)				->     bool:
 return np.array_equal(a      ,				matrix.conjugate().T					)
def 		_a       ( a					:np.ndarray      ,				a					:np.ndarray					)				->     Any:
 a						    = v.conjugate().T
 a						    = v_star.dot(a					)
 assert isinstance(a      ,				np.ndarray					)
 return (v_star_dot.dot(a					)) / (v_star.dot(a					))
def 		_a       ( )				->     None:
 a						    = np.array([[2, 2 + 1j, 4], [2 - 1j, 3, 1j], [4, -1j, 1]]					)
 a						    = np.array([[1], [2], [3]]					)
 assert is_hermitian(a					), F"""{a} is not hermitian."""
 print(rayleigh_quotient(a      ,				a					)					)

 a						    = np.array([[1, 2, 4], [2, 3, -1], [4, -1, 1]]					)
 assert is_hermitian(a					), F"""{a} is not hermitian."""
 assert rayleigh_quotient(a      ,				a					) == float(3					)


if __name__ == "__main__":
     import doctest

     doctest.testmod()
     tests()


