

_UpperCamelCase     =    (1, 153, 370, 371, 1634, 2467_8051, 115_1322_1901_8763_9925_6509_5597_9739_7152_2401)
_UpperCamelCase     =    (-153, -1, 0, 1.2, 200, "A", [], {}, None)
def 		UpperCamelCase_(    snake_case__:						int     ) ->				bool:
 if not isinstance(snake_case__						,					snake_case__     ) or n < 1:
  return False

 # Initialization of sum and number of digits.
 UpperCAmelCase__           =       0
 UpperCAmelCase__           =       0
 UpperCAmelCase__           =       n
 # Calculation of digits of the number
 while temp > 0:
  number_of_digits += 1
  temp //= 10
 # Dividing number into separate digits and find Armstrong number
 UpperCAmelCase__           =       n
 while temp > 0:
  UpperCAmelCase__           =       temp % 10
  total += rem**number_of_digits
  temp //= 10
 return n == total
def 		UpperCamelCase_(    snake_case__:						int     ) ->				bool:
 if not isinstance(snake_case__						,					snake_case__     ) or n < 1:
  return False

 # Init a "histogram" of the digits
 UpperCAmelCase__           =       [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
 UpperCAmelCase__           =       0
 UpperCAmelCase__           =       0
 UpperCAmelCase__           =       n
 while temp > 0:
  UpperCAmelCase__       ,					UpperCAmelCase__           =       divmod(snake_case__						,					10     )
  digit_histogram[rem] += 1
  digit_total += 1

 for cnt, i in zip(snake_case__						,					range(len(snake_case__     )     )     ):
  total += cnt * i**digit_total

 return n == total
def 		UpperCamelCase_(    snake_case__:						int     ) ->				bool:
 if not isinstance(snake_case__						,					snake_case__     ) or n < 1:
  return False
 UpperCAmelCase__           =       len(str(snake_case__     )     )  # the power that all digits will be raised to
 # check if sum of each digit multiplied expo times is equal to number
 return n == sum(int(snake_case__     ) ** expo for i in str(snake_case__     )     )
def 		UpperCamelCase_(    ) ->				int:
 UpperCAmelCase__           =       int(input('Enter an integer to see if it is an Armstrong number: '     ).strip()     )
 print(f"{num} is {'' if armstrong_number(snake_case__     ) else 'not '}an Armstrong number."     )
 print(f"{num} is {'' if narcissistic_number(snake_case__     ) else 'not '}an Armstrong number."     )
 print(f"{num} is {'' if pluperfect_number(snake_case__     ) else 'not '}an Armstrong number."     )


if __name__ == "__main__":
 import doctest

 doctest.testmod()
 main()






from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_UpperCamelCase     =    {
    '''configuration_fsmt''': ['''FSMT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''FSMTConfig'''],
    '''tokenization_fsmt''': ['''FSMTTokenizer'''],
}

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 _UpperCamelCase     =    ['''FSMTForConditionalGeneration''', '''FSMTModel''', '''PretrainedFSMTModel''']


if TYPE_CHECKING:
 from .configuration_fsmt import FSMT_PRETRAINED_CONFIG_ARCHIVE_MAP, FSMTConfig
 from .tokenization_fsmt import FSMTTokenizer

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_fsmt import FSMTForConditionalGeneration, FSMTModel, PretrainedFSMTModel

else:
 import sys

 _UpperCamelCase     =    _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)



