
"""simple docstring"""




from __future__ import annotations







def 							_UpperCAmelCase		(       lowerCamelCase__     ):





		"""simple docstring"""




		lowerCAmelCase__        =   str(__UpperCAmelCase     )
		return len(__UpperCAmelCase     ) == 9 and set(__UpperCAmelCase     ) == set("""123456789"""     )







def 							_UpperCAmelCase		(       ):





		"""simple docstring"""




		for base_num in range(9999			,  4999			,  -1     ):
				lowerCAmelCase__        =   10_0002 * base_num
				if is_9_pandigital(__UpperCAmelCase     ):
						return candidate

		for base_num in range(333			,  99			,  -1     ):
				lowerCAmelCase__        =   100_2003 * base_num
				if is_9_pandigital(__UpperCAmelCase     ):
						return candidate

		return None


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





"""simple docstring"""




import os
from math import logaa







def 							_UpperCAmelCase		(       lowerCamelCase__ = "base_exp.txt"     ):





		"""simple docstring"""




		lowerCAmelCase__        =   0
		lowerCAmelCase__        =   0
		for i, line in enumerate(open(os.path.join(os.path.dirname(lowerCamelCase__     )			,  lowerCamelCase__     )     )     ):
				lowerCAmelCase__   ,					lowerCAmelCase__        =   list(map(lowerCamelCase__			,  line.split(""","""     )     )     )
				if x * logaa(lowerCamelCase__     ) > largest:
						lowerCAmelCase__        =   x * logaa(lowerCamelCase__     )
						lowerCAmelCase__        =   i + 1
		return result


if __name__ == "__main__":
			print(solution())




