


"""simple docstring"""







import functools
from typing import Any
def 					a__			(				SCREAMING_SNAKE_CASE    :    str				,      SCREAMING_SNAKE_CASE    :    list[str]				):


  '''simple docstring'''







  if not isinstance(SCREAMING_SNAKE_CASE				,      SCREAMING_SNAKE_CASE				) or len(SCREAMING_SNAKE_CASE				) == 0:
    raise ValueError("the string should be not empty string"				)

  if not isinstance(SCREAMING_SNAKE_CASE				,      SCREAMING_SNAKE_CASE				) or not all(
      isinstance(SCREAMING_SNAKE_CASE				,      SCREAMING_SNAKE_CASE				) and len(SCREAMING_SNAKE_CASE				) > 0 for item in words				):
    raise ValueError("the words should be a list of non-empty strings"				)

  # Build trie
  lowerCAmelCase     :     dict[str, Any]								=							{}
  lowerCAmelCase     :     Union[str, Any]								=							"WORD_KEEPER"

  for word in words:
    lowerCAmelCase     :     int								=							trie
    for c in word:
      if c not in trie_node:
        lowerCAmelCase     :     Union[str, Any]								=							{}

      lowerCAmelCase     :     Tuple								=							trie_node[c]

    lowerCAmelCase     :     Optional[Any]								=							True

  lowerCAmelCase     :     str								=							len(SCREAMING_SNAKE_CASE				)

  # Dynamic programming method
  @functools.cache
  def is_breakable(SCREAMING_SNAKE_CASE    :    int				) -> bool:
    if index == len_string:
      return True

    lowerCAmelCase     :     str								=							trie
    for i in range(SCREAMING_SNAKE_CASE				,      SCREAMING_SNAKE_CASE				):
      lowerCAmelCase     :     Tuple								=							trie_node.get(string[i]				,      SCREAMING_SNAKE_CASE				)

      if trie_node is None:
        return False

      if trie_node.get(SCREAMING_SNAKE_CASE				,      SCREAMING_SNAKE_CASE				) and is_breakable(i + 1				):
        return True

    return False

  return is_breakable(0				)


if __name__ == "__main__":
     import doctest

     doctest.testmod()













"""simple docstring"""


from collections import defaultdict
from math import ceil, sqrt



def 					lowerCAmelCase				(    __UpperCamelCase = 1_0_0_0_0_0_0		,       __UpperCamelCase = 1_0 ):




  """simple docstring"""







  __A									= defaultdict(__UpperCamelCase )

  for outer_width in range(3		,       (t_limit // 4) + 2 ):
    if outer_width * outer_width > t_limit:
      __A									= max(
          ceil(sqrt(outer_width * outer_width - t_limit ) )		,       1 )
    else:
      __A									= 1

    hole_width_lower_bound += (outer_width - hole_width_lower_bound) % 2

    for hole_width in range(__UpperCamelCase		,       outer_width - 1		,       2 ):
      count[outer_width * outer_width - hole_width * hole_width] += 1

  return sum(1 for n in count.values() if 1 <= n <= 1_0 )


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




