


from __future__ import annotations




def    a   (							A__							)	-> bool:




      '''simple docstring'''

      SCREAMING_SNAKE_CASE__       :  Union[str, Any]						     =		str(A__							)
      return len(A__							) == 9 and set(A__							) == set('''123456789'''							)




def    a   (							)	-> int | None:




      '''simple docstring'''

      for base_num in range(9_9_9_9      ,    4_9_9_9      ,    -1							):
            SCREAMING_SNAKE_CASE__       :  Optional[Any]						     =		1_0_0_0_0_2 * base_num
            if is_9_pandigital(A__							):
                  return candidate

      for base_num in range(3_3_3      ,    9_9      ,    -1							):
            SCREAMING_SNAKE_CASE__       :  Tuple						     =		1_0_0_2_0_0_3 * base_num
            if is_9_pandigital(A__							):
                  return candidate

      return None


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













def  __magic_name__  (				lowercase = 100				)				-> int:

							"""simple docstring"""



							lowercase_	:   Dict  				=     (n * (n + 1) // 2) ** 2
							lowercase_	:   List[str]  				=     n * (n + 1) * (2 * n + 1) // 6
							return sum_cubes - sum_squares


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