





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


def      a	(							SCREAMING_SNAKE_CASE_      :		int							,			SCREAMING_SNAKE_CASE_      :		Optional[int]							,			SCREAMING_SNAKE_CASE_      :		List[str]							,			SCREAMING_SNAKE_CASE_      :		Union[str, Any]       ):






       """simple docstring"""





       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    :	Union[str, Any]   	=		0
              for digit in range(1_0       ):
                     UpperCamelCase    :	List[str]   	=		digit
                     result += reversible_numbers(
                         0							,			(remainder + 2 * digit) // 1_0							,			__UpperCAmelCase							,			__UpperCAmelCase       )
              return result

       UpperCamelCase    :	Union[str, Any]   	=		0
       for digita in range(1_0       ):
              UpperCamelCase    :	Optional[int]   	=		digita

              if (remainder + digita) % 2 == 0:
                     UpperCamelCase    :	str   	=		ODD_DIGITS
              else:
                     UpperCamelCase    :	Dict   	=		EVEN_DIGITS

              for digita in other_parity_digits:
                     UpperCamelCase    :	List[str]   	=		digita
                     result += reversible_numbers(
                         remaining_length - 2							,			(remainder + digita + digita) // 1_0							,			__UpperCAmelCase							,			__UpperCAmelCase							,			)
       return result


def      a	(							SCREAMING_SNAKE_CASE_      :		Union[str, Any] = 9       ):






       """simple docstring"""





       UpperCamelCase    :	Optional[Any]   	=		0
       for length in range(1							,			max_power + 1       ):
              result += reversible_numbers(__UpperCAmelCase							,			0							,			[0] * length							,			__UpperCAmelCase       )
       return result


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





import re
from pathlib import Path
from unittest import TestCase

import pytest



@pytest.mark.integration
class    UpperCAmelCase_	(							_a):
       '''simple docstring'''






       def  _lowercase   (     self ,					__SCREAMING_SNAKE_CASE						):




              """simple docstring"""




              with open(__SCREAMING_SNAKE_CASE ,					encoding='''utf-8'''						) as input_file:
                     UpperCamelCase    :	str   	=		re.compile(R'''(?!.*\b(?:encoding|rb|w|wb|w+|wb+|ab|ab+)\b)(?<=\s)(open)\((.*)\)'''						)
                     UpperCamelCase    :	Optional[int]   	=		input_file.read()
                     UpperCamelCase    :	Union[str, Any]   	=		regexp.search(__SCREAMING_SNAKE_CASE						)

              return match






       def  _lowercase   (     self ,					__SCREAMING_SNAKE_CASE						):




              """simple docstring"""




              with open(__SCREAMING_SNAKE_CASE ,					encoding='''utf-8'''						) as input_file:
                     UpperCamelCase    :	Optional[int]   	=		re.compile(R'''#[^\r\n]*print\(|\"[^\r\n]*print\(|\"\"\".*?print\(.*?\"\"\"|(print\()''' ,					re.DOTALL						)
                     UpperCamelCase    :	Tuple   	=		input_file.read()
                     # use `re.finditer` to handle the case where the ignored groups would be matched first by `re.search`
                     UpperCamelCase    :	Dict   	=		regexp.finditer(__SCREAMING_SNAKE_CASE						)

              UpperCamelCase    :	int   	=		[match for match in matches if match is not None and match.group(1						) is not None]
              return matches[0] if matches else None






       def  _lowercase   (     self						):




              """simple docstring"""




              UpperCamelCase    :	int   	=		Path('''./datasets'''						)
              UpperCamelCase    :	Tuple   	=		list(dataset_paths.absolute().glob('''**/*.py'''						)						)

              for dataset in dataset_files:
                     if self._no_encoding_on_file_open(str(__SCREAMING_SNAKE_CASE						)						):
                            raise AssertionError(f"""open(...) must use utf-8 encoding in {dataset}"""						)






       def  _lowercase   (     self						):




              """simple docstring"""




              UpperCamelCase    :	Optional[int]   	=		Path('''./datasets'''						)
              UpperCamelCase    :	Tuple   	=		list(dataset_paths.absolute().glob('''**/*.py'''						)						)

              for dataset in dataset_files:
                     if self._no_print_statements(str(__SCREAMING_SNAKE_CASE						)						):
                            raise AssertionError(f"""print statement found in {dataset}. Use datasets.logger/logging instead."""						)

