





SCREAMING_SNAKE_CASE		:List[str]				  =    (1, 153, 370, 371, 1634, 2467_8051, 115_1322_1901_8763_9925_6509_5597_9739_7152_2401)
SCREAMING_SNAKE_CASE		:tuple				  =    (-153, -1, 0, 1.2, 200, "A", [], {}, None)




def  lowerCAmelCase(			SCREAMING_SNAKE_CASE_ )->	bool:



    """simple docstring"""






    if not isinstance(SCREAMING_SNAKE_CASE_ ,	SCREAMING_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 //= 1_0
    # Dividing number into separate digits and find Armstrong number
    UpperCamelCase_      =	n
    while temp > 0:
        UpperCamelCase_      =	temp % 1_0
        total += rem**number_of_digits
        temp //= 1_0
    return n == total




def  lowerCAmelCase(			SCREAMING_SNAKE_CASE_ )->	bool:



    """simple docstring"""






    if not isinstance(SCREAMING_SNAKE_CASE_ ,	SCREAMING_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(SCREAMING_SNAKE_CASE_ ,	1_0 )
        digit_histogram[rem] += 1
        digit_total += 1

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

    return n == total




def  lowerCAmelCase(			SCREAMING_SNAKE_CASE_ )->	bool:



    """simple docstring"""






    if not isinstance(SCREAMING_SNAKE_CASE_ ,	SCREAMING_SNAKE_CASE_ ) or n < 1:
        return False
    UpperCamelCase_      =	len(str(SCREAMING_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(SCREAMING_SNAKE_CASE_ ) ** expo for i in str(SCREAMING_SNAKE_CASE_ ) )




def  lowerCAmelCase(			)->	Tuple:



    """simple docstring"""






    UpperCamelCase_      =	int(input("Enter an integer to see if it is an Armstrong number: " ).strip() )
    print(f"{num} is {'' if armstrong_number(SCREAMING_SNAKE_CASE_ ) else 'not '}an Armstrong number." )
    print(f"{num} is {'' if narcissistic_number(SCREAMING_SNAKE_CASE_ ) else 'not '}an Armstrong number." )
    print(f"{num} is {'' if pluperfect_number(SCREAMING_SNAKE_CASE_ ) else 'not '}an Armstrong number." )


if __name__ == "__main__":
 import doctest

 doctest.testmod()
 main()



class 	__magic_name__				:






     def __init__(							self		,	_lowercase  )->    None:
         UpperCamelCase_      =	data
         UpperCamelCase_      =	42
         UpperCamelCase_      =	42




def  lowerCAmelCase(			SCREAMING_SNAKE_CASE_ )->	None:



    """simple docstring"""






    UpperCamelCase_      =	0
    UpperCamelCase_      =	x




def  lowerCAmelCase(			SCREAMING_SNAKE_CASE_ ,	SCREAMING_SNAKE_CASE_ )->	None:



    """simple docstring"""






    UpperCamelCase_     ,					UpperCamelCase_      =	find_set(SCREAMING_SNAKE_CASE_ ), find_set(SCREAMING_SNAKE_CASE_ )
    if x == y:
        return

    elif x.rank > y.rank:
        UpperCamelCase_      =	x
    else:
        UpperCamelCase_      =	y
        if x.rank == y.rank:
            y.rank += 1




def  lowerCAmelCase(			SCREAMING_SNAKE_CASE_ )->	Node:



    """simple docstring"""






    if x != x.parent:
        UpperCamelCase_      =	find_set(x.parent )
    return x.parent




def  lowerCAmelCase(			SCREAMING_SNAKE_CASE_ )->	set:



    """simple docstring"""






    UpperCamelCase_      =	({0, 1, 2}, {3, 4, 5})
    for s in sets:
        if node.data in s:
            return s
    UpperCamelCase_      =	f"{node.data} is not in {sets}"
    raise ValueError(SCREAMING_SNAKE_CASE_ )




def  lowerCAmelCase(			)->	None:



    """simple docstring"""






    UpperCamelCase_      =	[Node(SCREAMING_SNAKE_CASE_ ) for i in range(6 )]
    for v in vertex:
        make_set(SCREAMING_SNAKE_CASE_ )

    union_set(vertex[0] ,	vertex[1] )
    union_set(vertex[1] ,	vertex[2] )
    union_set(vertex[3] ,	vertex[4] )
    union_set(vertex[3] ,	vertex[5] )

    for nodea in vertex:
        for nodea in vertex:
            if find_python_set(SCREAMING_SNAKE_CASE_ ).isdisjoint(find_python_set(SCREAMING_SNAKE_CASE_ ) ):
                assert find_set(SCREAMING_SNAKE_CASE_ ) != find_set(SCREAMING_SNAKE_CASE_ )
            else:
                assert find_set(SCREAMING_SNAKE_CASE_ ) == find_set(SCREAMING_SNAKE_CASE_ )


if __name__ == "__main__":
 test_disjoint_set()
