




SCREAMING_SNAKE_CASE_    :       Union[str, Any]       =							(1, 1_53, 3_70, 3_71, 16_34, 24_67_80_51, 1_15_13_22_19_01_87_63_99_25_65_09_55_97_97_39_71_52_24_01)
SCREAMING_SNAKE_CASE_    :       tuple       =							(-1_53, -1, 0, 1.2, 2_00, "A", [], {}, None)
def 							__lowerCAmelCase			(UpperCAmelCase_		):
    if not isinstance(UpperCAmelCase_ ,     UpperCAmelCase_		) or n < 1:
        return False

    # Initialization of sum and number of digits.
    a__  			=							0
    a__  			=							0
    a__  			=							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
    a__  			=							n
    while temp > 0:
        a__  			=							temp % 10
        total += rem**number_of_digits
        temp //= 10
    return n == total
def 							__lowerCAmelCase			(UpperCAmelCase_		):
    if not isinstance(UpperCAmelCase_ ,     UpperCAmelCase_		) or n < 1:
        return False

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

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

    return n == total
def 							__lowerCAmelCase			(UpperCAmelCase_		):
    if not isinstance(UpperCAmelCase_ ,     UpperCAmelCase_		) or n < 1:
        return False
    a__  			=							len(str(UpperCAmelCase_		)		)  # 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(UpperCAmelCase_		) ** expo for i in str(UpperCAmelCase_		)		)
def 							__lowerCAmelCase			():
    a__  			=							int(input("""Enter an integer to see if it is an Armstrong number: """		).strip()		)
    print(F"""{num} is {'' if armstrong_number(UpperCAmelCase_		) else 'not '}an Armstrong number."""		)
    print(F"""{num} is {'' if narcissistic_number(UpperCAmelCase_		) else 'not '}an Armstrong number."""		)
    print(F"""{num} is {'' if pluperfect_number(UpperCAmelCase_		) else 'not '}an Armstrong number."""		)


if __name__ == "__main__":
 import doctest

 doctest.testmod()
 main()










'''simple docstring'''

from __future__ import annotations

import random
from collections.abc import Iterable
from typing import Any, Generic, TypeVar

_UpperCAmelCase					:			Any				     =					TypeVar("""T""", bound=bool)


class    a__					(			Generic[T]   ):







				"""simple docstring"""



				def __init__(self							,      __lowercase		):
										__lowerCAmelCase											=					value
										__lowerCAmelCase											=					None
										__lowerCAmelCase											=					None




				@property
				def        _snake_case	(self		):
										return self._value




				@staticmethod
				def        _snake_case	(__lowercase							,      __lowercase		):
										if not roota:
																return roota

										if not roota:
																return roota

										if roota.value > roota.value:
																__lowerCAmelCase							,       __lowerCAmelCase											=					roota, roota

										if random.choice([True, False]		):
																__lowerCAmelCase							,       __lowerCAmelCase											=					roota.right, roota.left

										__lowerCAmelCase											=					RandomizedHeapNode.merge(roota.left							,      __lowercase		)

										return roota


class    a__					(			Generic[T]   ):







				"""simple docstring"""



				def __init__(self							,      __lowercase = ()		):
										__lowerCAmelCase											=					None

										if data:
																for item in data:
																						self.insert(__lowercase		)




				def        _snake_case	(self							,      __lowercase		):
										__lowerCAmelCase											=					RandomizedHeapNode.merge(self._root							,      RandomizedHeapNode(__lowercase		)		)




				def        _snake_case	(self		):
										__lowerCAmelCase											=					self.top()

										if self._root is None:
																return None

										__lowerCAmelCase											=					RandomizedHeapNode.merge(self._root.left							,      self._root.right		)

										return result




				def        _snake_case	(self		):
										if not self._root:
																raise IndexError('''Can\'t get top element for the empty heap.'''		)
										return self._root.value




				def        _snake_case	(self		):
										__lowerCAmelCase											=					None




				def        _snake_case	(self		):
										__lowerCAmelCase											=					[]
										while self:
																result.append(self.pop()		)

										return result




				def __bool__(self		):
										return self._root is not None


if __name__ == "__main__":
	import doctest

	doctest.testmod()

