



'''simple docstring'''


from __future__ import annotations






def  UpperCAmelCase_       (		lowercase__       ):


					'''simple docstring'''







					a_       		=str(UpperCamelCase__       )
					return len(UpperCamelCase__       ) == 9 and set(UpperCamelCase__       ) == set("123456789"       )






def  UpperCAmelCase_       (		):


					'''simple docstring'''







					for base_num in range(9_9_9_9       ,	4_9_9_9       ,	-1       ):
										a_       		=1_0_0_0_0_2 * base_num
										if is_9_pandigital(UpperCamelCase__       ):
															return candidate

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

					return None


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







'''simple docstring'''


import os

# Precomputes a list of the 100 first triangular numbers
lowercase							       =			[int(0.5 * n * (n + 1)) for n in range(1, 101)]






def  UpperCAmelCase_       (		):


     '''simple docstring'''







     a_       		=os.path.dirname(os.path.realpath(lowercase__       )       )
     a_       		=os.path.join(lowercase__       ,	"words.txt"       )

     a_       		=""
     with open(lowercase__       ) as f:
          a_       		=f.readline()

     a_       		=[word.strip("\""       ) for word in words.strip("\r\n"       ).split(","       )]
     a_       		=[
         word
         for word in [sum(ord(lowercase__       ) - 6_4 for x in word       ) for word in words]
         if word in TRIANGULAR_NUMBERS
     ]
     return len(lowercase__       )


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


