




from itertools import permutations



def 				_A  (		lowerCAmelCase_	:   tuple     ):
     """simple docstring"""

     if num[3] % 2 != 0:
          return False

     if (num[2] + num[3] + num[4]) % 3 != 0:
          return False

     if num[5] % 5 != 0:
          return False

     lowerCAmelCase__            =					[7, 11, 13, 17]
     for i, test in enumerate(lowerCAmelCase_     ):
          if (num[i + 4] * 100 + num[i + 5] * 10 + num[i + 6]) % test != 0:
               return False
     return True



def 				_A  (		lowerCAmelCase_	:   int = 10     ):
     """simple docstring"""

     return sum(
         int("".join(map(lowerCAmelCase_  ,							lowerCAmelCase_     )     )     )
         for num in permutations(range(lowerCAmelCase_     )     )
         if is_substring_divisible(lowerCAmelCase_     )     )


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








import os

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





def    __lowerCAmelCase   (    ):
     __lowerCAmelCase             =       os.path.dirname(os.path.realpath(__snake_case							)							)
     __lowerCAmelCase             =       os.path.join(__snake_case       ,			"words.txt"							)

     __lowerCAmelCase             =       ""
     with open(__snake_case							) as f:
          __lowerCAmelCase             =       f.readline()

     __lowerCAmelCase             =       [word.strip("\""							) for word in words.strip("\r\n"							).split(","							)]
     __lowerCAmelCase             =       [
         word
         for word in [sum(ord(__snake_case							) - 64 for x in word							) for word in words]
         if word in TRIANGULAR_NUMBERS
     ]
     return len(__snake_case							)


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






