




'''simple docstring'''
from math import factorial

_SCREAMING_SNAKE_CASE			=						{str(digit): factorial(digit) for digit in range(10)}





def 			lowerCamelCase(							SCREAMING_SNAKE_CASE_     )		->		int:
			if not isinstance(SCREAMING_SNAKE_CASE_       ,SCREAMING_SNAKE_CASE_     ):
						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(SCREAMING_SNAKE_CASE_     )     )





def 			lowerCamelCase(							SCREAMING_SNAKE_CASE_ = 60       ,SCREAMING_SNAKE_CASE_ = 100_0000     )		->		int:

			if not isinstance(SCREAMING_SNAKE_CASE_       ,SCREAMING_SNAKE_CASE_     ) or not isinstance(SCREAMING_SNAKE_CASE_       ,SCREAMING_SNAKE_CASE_     ):
						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
			A_									= 0
			# the cached sizes of the previous chains
			A_									= {}

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

						# Stop computing the chain when you find a cached size, a repeating item or the
						# length is greater then the desired one.
						A_									= 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(SCREAMING_SNAKE_CASE_     )
									chain_set_length += 1
									A_									= digit_factorial_sum(SCREAMING_SNAKE_CASE_     )

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

						A_									= 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'''
from ...configuration_utils import PretrainedConfig
from ...utils import logging


_SCREAMING_SNAKE_CASE			=						logging.get_logger(__name__)

_SCREAMING_SNAKE_CASE			=						{
    "facebook/dpr-ctx_encoder-single-nq-base": (
        "https://huggingface.co/facebook/dpr-ctx_encoder-single-nq-base/resolve/main/config.json"
    ),
    "facebook/dpr-question_encoder-single-nq-base": (
        "https://huggingface.co/facebook/dpr-question_encoder-single-nq-base/resolve/main/config.json"
    ),
    "facebook/dpr-reader-single-nq-base": (
        "https://huggingface.co/facebook/dpr-reader-single-nq-base/resolve/main/config.json"
    ),
    "facebook/dpr-ctx_encoder-multiset-base": (
        "https://huggingface.co/facebook/dpr-ctx_encoder-multiset-base/resolve/main/config.json"
    ),
    "facebook/dpr-question_encoder-multiset-base": (
        "https://huggingface.co/facebook/dpr-question_encoder-multiset-base/resolve/main/config.json"
    ),
    "facebook/dpr-reader-multiset-base": (
        "https://huggingface.co/facebook/dpr-reader-multiset-base/resolve/main/config.json"
    ),
}
class   __UpperCAmelCase				(     lowerCAmelCase				):



					'''simple docstring'''





					_UpperCamelCase							=		"""dpr"""



					def __init__(	self     :						Optional[Any]      ,       _lowercase     :						Dict=30_522      ,       _lowercase     :						Tuple=768      ,       _lowercase     :						int=12      ,       _lowercase     :						List[str]=12      ,       _lowercase     :						Union[str, Any]=3_072      ,       _lowercase     :						Dict="gelu"      ,       _lowercase     :						Dict=0.1      ,       _lowercase     :						Any=0.1      ,       _lowercase     :						Union[str, Any]=512      ,       _lowercase     :						Optional[int]=2      ,       _lowercase     :						Union[str, Any]=0.02      ,       _lowercase     :						List[Any]=1E-12      ,       _lowercase     :						List[str]=0      ,       _lowercase     :						Dict="absolute"      ,       _lowercase     :						int = 0      ,       **_lowercase     :						int      ,       )    ->							int:
								super().__init__(pad_token_id=_lowercase      ,       **_lowercase)

								A_									= vocab_size
								A_									= hidden_size
								A_									= num_hidden_layers
								A_									= num_attention_heads
								A_									= hidden_act
								A_									= intermediate_size
								A_									= hidden_dropout_prob
								A_									= attention_probs_dropout_prob
								A_									= max_position_embeddings
								A_									= type_vocab_size
								A_									= initializer_range
								A_									= layer_norm_eps
								A_									= projection_dim
								A_									= position_embedding_type




