
from __future__ import annotations






def 							_lowercase							(     UpperCamelCase_		)		->		bool:
					'''simple docstring'''


					SCREAMING_SNAKE_CASE__													= str(UpperCamelCase_		)
					return len(UpperCamelCase_		) == 9 and set(UpperCamelCase_		) == set('123456789'		)






def 							_lowercase							(     )		->		int | None:
					'''simple docstring'''


					for base_num in range(9999	,	4999	,	-1		):
										SCREAMING_SNAKE_CASE__													= 100002 * base_num
										if is_9_pandigital(UpperCamelCase_		):
															return candidate

					for base_num in range(333	,	99	,	-1		):
										SCREAMING_SNAKE_CASE__													= 1002003 * base_num
										if is_9_pandigital(UpperCamelCase_		):
															return candidate

					return None


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







import os
from math import logaa






def 							_lowercase							(     UpperCamelCase_ = "base_exp.txt"		)		->		int:
					'''simple docstring'''


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


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





