


def 				UpperCamelCase__					(  SCREAMING_SNAKE_CASE__						):
 __lowerCamelCase		:							List[Any]		 =						0
 while len(lowercase__						) > 1:
  __lowerCamelCase		:							List[Any]		 =						0
  # Consider two files with minimum cost to be merged
  for _ in range(2						):
   __lowerCamelCase		:							Union[str, Any]		 =						files.index(min(lowercase__						)						)
   temp += files[min_index]
   files.pop(lowercase__						)
  files.append(lowercase__						)
  optimal_merge_cost += temp
 return optimal_merge_cost


if __name__ == "__main__":
   import doctest

   doctest.testmod()





from __future__ import annotations
def 				UpperCamelCase__					(  SCREAMING_SNAKE_CASE__						):
 __lowerCamelCase		:							List[Any]		 =						str(SCREAMING_SNAKE_CASE__						)
 return len(SCREAMING_SNAKE_CASE__						) == 9 and set(SCREAMING_SNAKE_CASE__						) == set('123456789'						)
def 				UpperCamelCase__					(  ):
 for base_num in range(9_999      ,	4_999      ,	-1						):
  __lowerCamelCase		:							Tuple		 =						100_002 * base_num
  if is_9_pandigital(SCREAMING_SNAKE_CASE__						):
   return candidate

 for base_num in range(333      ,	99      ,	-1						):
  __lowerCamelCase		:							Union[str, Any]		 =						1_002_003 * base_num
  if is_9_pandigital(SCREAMING_SNAKE_CASE__						):
   return candidate

 return None


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

