





"""simple docstring"""


from math import sqrt





def 							a__     (					_UpperCAmelCase		)      ->					str:

 '''simple docstring'''






 snake_case__      							=			[1]
 for i in range(2		,       int(sqrt(_UpperCAmelCase		)		) + 1		,       1		):
  if number % i == 0:
   values.append(_UpperCAmelCase		)
   if int(number // i		) != i:
    values.append(int(number // i		)		)
 return sorted(_UpperCAmelCase		)





def 							a__     (					_UpperCAmelCase		)      ->					Optional[int]:

 '''simple docstring'''






 return sum(factors(_UpperCAmelCase		)		) > n





def 							a__     (					_UpperCAmelCase		)      ->					Optional[Any]:

 '''simple docstring'''






 snake_case__      							=			factors(_UpperCAmelCase		)
 snake_case__      							=			len(_UpperCAmelCase		)
 snake_case__      							=			[[0 for i in range(number + 1		)] for j in range(r + 1		)]
 for i in range(r + 1		):
  snake_case__      							=			True

 for i in range(1		,       number + 1		):
  snake_case__      							=			False

 for i in range(1		,       r + 1		):
  for j in range(1		,       number + 1		):
   if j < values[i - 1]:
    snake_case__      							=			subset[i - 1][j]
   else:
    snake_case__      							=			subset[i - 1][j] or subset[i - 1][j - values[i - 1]]

 return subset[r][number] != 0





def 							a__     (					_UpperCAmelCase		)      ->					Dict:

 '''simple docstring'''






 return abundant(_UpperCAmelCase		) and not semi_perfect(_UpperCAmelCase		)


if __name__ == "__main__":
   import doctest

   doctest.testmod(verbose=True)
   for number in (6_9, 7_0, 7_1):
      print(f'''{number} is {'' if weird(number) else 'not '}weird.''')








"""simple docstring"""


import copy

from ...configuration_utils import PretrainedConfig
from ...utils import logging


a__   :       Optional[Any]   						=			logging.get_logger(__name__)

a__   :       List[str]   						=			{}



class        lowercase_			(       __lowerCAmelCase							):
       snake_case__			:							List[str]										=       """fsmt_decoder"""

       def __init__(     self				,   __SCREAMING_SNAKE_CASE=0				,   __SCREAMING_SNAKE_CASE=0       ):






        '''simple docstring'''

        super().__init__()
        snake_case__      							=			vocab_size
        snake_case__      							=			bos_token_id



class        lowercase_			(       __lowerCAmelCase							):
       snake_case__			:							str										=       """fsmt"""
       snake_case__			:							List[Any]										=       {"""num_attention_heads""": """encoder_attention_heads""", """hidden_size""": """d_model"""}

       def __init__(     self				,   __SCREAMING_SNAKE_CASE=["en", "de"]				,   __SCREAMING_SNAKE_CASE=4_2024				,   __SCREAMING_SNAKE_CASE=4_2024				,   __SCREAMING_SNAKE_CASE="relu"				,   __SCREAMING_SNAKE_CASE=1024				,   __SCREAMING_SNAKE_CASE=200				,   __SCREAMING_SNAKE_CASE=1024				,   __SCREAMING_SNAKE_CASE=4096				,   __SCREAMING_SNAKE_CASE=12				,   __SCREAMING_SNAKE_CASE=16				,   __SCREAMING_SNAKE_CASE=0.0				,   __SCREAMING_SNAKE_CASE=4096				,   __SCREAMING_SNAKE_CASE=12				,   __SCREAMING_SNAKE_CASE=16				,   __SCREAMING_SNAKE_CASE=0.0				,   __SCREAMING_SNAKE_CASE=0.0				,   __SCREAMING_SNAKE_CASE=0.1				,   __SCREAMING_SNAKE_CASE=0.0				,   __SCREAMING_SNAKE_CASE=0.02				,   __SCREAMING_SNAKE_CASE=2				,   __SCREAMING_SNAKE_CASE=True				,   __SCREAMING_SNAKE_CASE=True				,   __SCREAMING_SNAKE_CASE=False				,   __SCREAMING_SNAKE_CASE=5				,   __SCREAMING_SNAKE_CASE=1.0				,   __SCREAMING_SNAKE_CASE=False				,   __SCREAMING_SNAKE_CASE=True				,   __SCREAMING_SNAKE_CASE=1				,   __SCREAMING_SNAKE_CASE=0				,   __SCREAMING_SNAKE_CASE=2				,   __SCREAMING_SNAKE_CASE=2				,   **__SCREAMING_SNAKE_CASE				,   ):






        '''simple docstring'''

        snake_case__      							=			langs
        snake_case__      							=			src_vocab_size
        snake_case__      							=			tgt_vocab_size
        snake_case__      							=			d_model  # encoder_embed_dim and decoder_embed_dim

        snake_case__      							=			encoder_ffn_dim
        snake_case__      							=			snake_case__      							=			encoder_layers
        snake_case__      							=			encoder_attention_heads
        snake_case__      							=			encoder_layerdrop
        snake_case__      							=			decoder_layerdrop
        snake_case__      							=			decoder_ffn_dim
        snake_case__      							=			decoder_layers
        snake_case__      							=			decoder_attention_heads
        snake_case__      							=			max_position_embeddings
        snake_case__      							=			init_std  # Normal(0, this parameter)
        snake_case__      							=			activation_function

        snake_case__      							=			DecoderConfig(vocab_size=__SCREAMING_SNAKE_CASE				,   bos_token_id=__SCREAMING_SNAKE_CASE       )
        if "decoder" in common_kwargs:
         del common_kwargs["decoder"]

        snake_case__      							=			scale_embedding  # scale factor will be sqrt(d_model) if True

        # 3 Types of Dropout
        snake_case__      							=			attention_dropout
        snake_case__      							=			activation_dropout
        snake_case__      							=			dropout

        snake_case__      							=			use_cache
        super().__init__(
            pad_token_id=__SCREAMING_SNAKE_CASE				,   bos_token_id=__SCREAMING_SNAKE_CASE				,   eos_token_id=__SCREAMING_SNAKE_CASE				,   decoder_start_token_id=__SCREAMING_SNAKE_CASE				,   is_encoder_decoder=__SCREAMING_SNAKE_CASE				,   tie_word_embeddings=__SCREAMING_SNAKE_CASE				,   forced_eos_token_id=__SCREAMING_SNAKE_CASE				,   max_length=__SCREAMING_SNAKE_CASE				,   num_beams=__SCREAMING_SNAKE_CASE				,   length_penalty=__SCREAMING_SNAKE_CASE				,   early_stopping=__SCREAMING_SNAKE_CASE				,   **__SCREAMING_SNAKE_CASE				,   )

       def 						_SCREAMING_SNAKE_CASE(     self       ):






        '''simple docstring'''

        snake_case__      							=			copy.deepcopy(self.__dict__       )
        snake_case__      							=			self.decoder.to_dict()
        snake_case__      							=			self.__class__.model_type
        return output

