
from math import factorial

lowerCamelCase__     :		dict[str, int]        = {str(digit): factorial(digit) for digit in range(1_0)}

def 		UpperCamelCase						(   lowercase_ )		->						int:


  '''simple docstring'''






  if not isinstance(lowercase_			,			lowercase_ ):
    raise TypeError("""Parameter number must be int""" )

  if number < 0:
    raise ValueError("""Parameter number must be greater than or equal to 0""" )

  # Converts number in string to iterate on its digits and adds its factorial.
  return sum(DIGIT_FACTORIAL[digit] for digit in str(lowercase_ ) )

def 		UpperCamelCase						(   lowercase_ = 60			,			lowercase_ = 1_00_00_00 )		->						int:


  '''simple docstring'''






  if not isinstance(lowercase_			,			lowercase_ ) or not isinstance(lowercase_			,			lowercase_ ):
    raise TypeError("""Parameters chain_length and number_limit must be int""" )

  if chain_length <= 0 or number_limit <= 0:
    raise ValueError(
        """Parameters chain_length and number_limit must be greater than 0""" )

  # the counter for the chains with the exact desired length
  lowercase__	: str     		=   0
  # the cached sizes of the previous chains
  lowercase__	: dict[int, int]     		=   {}

  for start_chain_element in range(1			,			lowercase_ ):
    # The temporary set will contain the elements of the chain
    lowercase__	: Dict     		=   set()
    lowercase__	: Dict     		=   0

    # Stop computing the chain when you find a cached size, a repeating item or the
    # length is greater then the desired one.
    lowercase__	: Optional[Any]     		=   start_chain_element
    while (
        chain_element not in chain_sets_lengths
        and chain_element not in chain_set
        and chain_set_length <= chain_length
    ):
      chain_set.add(lowercase_ )
      chain_set_length += 1
      lowercase__	: Any     		=   digit_factorial_sum(lowercase_ )

    if chain_element in chain_sets_lengths:
      chain_set_length += chain_sets_lengths[chain_element]

    lowercase__	: Union[str, Any]     		=   chain_set_length

    # If chain contains the exact amount of elements increase the counter
    if chain_set_length == chain_length:
      chains_counter += 1

  return chains_counter


if __name__ == "__main__":
     import doctest

     doctest.testmod()
     print(f'''{solution()}''')











'''simple docstring'''






def  lowerCamelCase__			(		_A					,     _A					,     _A=False							):

  if isinstance(_A					,     _A							) and isinstance(_A					,     _A							):
    a		:   Tuple	  =	len(set_a.intersection(_A							)							)

    if alternative_union:
      a		:   Union[str, Any]	  =	len(_A							) + len(_A							)
    else:
      a		:   Optional[Any]	  =	len(set_a.union(_A							)							)

    return intersection / union

  if isinstance(_A					,     (list, tuple)							) and isinstance(_A					,     (list, tuple)							):
    a		:   int	  =	[element for element in set_a if element in set_b]

    if alternative_union:
      a		:   Optional[int]	  =	len(_A							) + len(_A							)
      return len(_A							) / union
    else:
      a		:   Tuple	  =	set_a + [element for element in set_b if element not in set_a]
      return len(_A							) / len(_A							)

    return len(_A							) / len(_A							)
  return None


if __name__ == "__main__":
     lowerCAmelCase:   str					=		{'a', 'b', 'c', 'd', 'e'}
     lowerCAmelCase:   Optional[Any]					=		{'c', 'd', 'e', 'f', 'h', 'i'}
     print(jaccard_similarity(set_a, set_b))