


snake_case       :					int        =  {
    '''0''': 1,
    '''1''': 1,
    '''2''': 2,
    '''3''': 6,
    '''4''': 24,
    '''5''': 1_20,
    '''6''': 7_20,
    '''7''': 50_40,
    '''8''': 4_03_20,
    '''9''': 36_28_80,
}

snake_case       :					List[Any]        =  {1_45: 1_45}

snake_case       :					List[str]        =  {
    1_45: 0,
    1_69: 3,
    3_63_01: 3,
    14_54: 3,
    8_71: 2,
    4_53_61: 2,
    8_72: 2,
}
def        __lowerCamelCase		(				UpperCAmelCase_		:	int		):




						"""simple docstring"""





						if n in CACHE_SUM_DIGIT_FACTORIALS:
												return CACHE_SUM_DIGIT_FACTORIALS[n]
						a		:Any											= sum(DIGIT_FACTORIALS[let] for let in str(UpperCAmelCase_		)		)
						a		:List[str]											= ret
						return ret
def        __lowerCamelCase		(				UpperCAmelCase_		:	int				,						UpperCAmelCase_		:	set | None = None		):




						"""simple docstring"""





						a		:Union[str, Any]											= previous or set()
						if n in CHAIN_LENGTH_CACHE:
												return CHAIN_LENGTH_CACHE[n]
						a		:Union[str, Any]											= sum_digit_factorials(UpperCAmelCase_		)
						if next_number in previous:
												a		:Tuple											= 0
												return 0
						else:
												previous.add(UpperCAmelCase_		)
												a		:Any											= 1 + chain_length(UpperCAmelCase_				,						UpperCAmelCase_		)
												a		:Dict											= ret
												return ret
def        __lowerCamelCase		(				UpperCAmelCase_		:	int = 60				,						UpperCAmelCase_		:	int = 100_0000		):




						"""simple docstring"""





						return sum(1 for i in range(1				,						UpperCAmelCase_		) if chain_length(UpperCAmelCase_		) == num_terms		)


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









from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_torch_available,
)


snake_case       :					Dict        =  {
    '''configuration_align''': [
        '''ALIGN_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''AlignConfig''',
        '''AlignTextConfig''',
        '''AlignVisionConfig''',
    ],
    '''processing_align''': ['''AlignProcessor'''],
}

try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     snake_case       :					List[str]        =  [
         '''ALIGN_PRETRAINED_MODEL_ARCHIVE_LIST''',
         '''AlignModel''',
         '''AlignPreTrainedModel''',
         '''AlignTextModel''',
         '''AlignVisionModel''',
     ]

if TYPE_CHECKING:
     from .configuration_align import (
         ALIGN_PRETRAINED_CONFIG_ARCHIVE_MAP,
         AlignConfig,
         AlignTextConfig,
         AlignVisionConfig,
     )
     from .processing_align import AlignProcessor

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_align import (
              ALIGN_PRETRAINED_MODEL_ARCHIVE_LIST,
              AlignModel,
              AlignPreTrainedModel,
              AlignTextModel,
              AlignVisionModel,
          )

else:
     import sys

     snake_case       :					int        =  _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)





