



'''simple docstring'''



lowerCAmelCase						:		str						      = (1, 1_5_3, 3_7_0, 3_7_1, 1_6_3_4, 2_4_6_7_8_0_5_1, 1_1_5_1_3_2_2_1_9_0_1_8_7_6_3_9_9_2_5_6_5_0_9_5_5_9_7_9_7_3_9_7_1_5_2_2_4_0_1)
lowerCAmelCase						:		int						      = (-1_5_3, -1, 0, 1.2, 2_0_0, '''A''', [], {}, None)



def 	__lowerCAmelCase       (				lowerCamelCase :    int       ):






	'''simple docstring'''




	if not isinstance(__a					,		__a       ) or n < 1:
		return False

	# Initialization of sum and number of digits.
	__lowerCAmelCase       				=	0
	__lowerCAmelCase       				=	0
	__lowerCAmelCase       				=	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
	__lowerCAmelCase       				=	n
	while temp > 0:
		__lowerCAmelCase       				=	temp % 10
		total += rem**number_of_digits
		temp //= 10
	return n == total



def 	__lowerCAmelCase       (				lowerCamelCase :    int       ):






	'''simple docstring'''




	if not isinstance(__a					,		__a       ) or n < 1:
		return False

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

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

	return n == total



def 	__lowerCAmelCase       (				lowerCamelCase :    int       ):






	'''simple docstring'''




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



def 	__lowerCAmelCase       (				):






	'''simple docstring'''




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


if __name__ == "__main__":
	import doctest

	doctest.testmod()
	main()




from __future__ import annotations

class 			__snake_case   :







							'''simple docstring'''






							def __init__(				self	,	a_ = 0		):
											a__					   =		value
											a__					   =		None
											a__					   =		None




def       A_   (						__a  :					Node | None			,		__a  :					Node | None		):

				"""simple docstring"""
				if treea is None:
								return treea
				if treea is None:
								return treea

				a__					   =		treea.value + treea.value
				a__					   =		merge_two_binary_trees(treea.left			,		treea.left		)
				a__					   =		merge_two_binary_trees(treea.right			,		treea.right		)
				return treea

def       A_   (						__a  :					Node | None		):

				"""simple docstring"""
				if root:
								print(root.value		)
								print_preorder(root.left		)
								print_preorder(root.right		)


if __name__ == "__main__":
	UpperCAmelCase							=       Node(1)
	UpperCAmelCase							=       Node(2)
	UpperCAmelCase							=       Node(3)
	UpperCAmelCase							=       Node(4)

	UpperCAmelCase							=       Node(2)
	UpperCAmelCase							=       Node(4)
	UpperCAmelCase							=       Node(6)
	UpperCAmelCase							=       Node(9)
	UpperCAmelCase							=       Node(5)

	print("""Tree1 is: """)
	print_preorder(treea)
	print("""Tree2 is: """)
	print_preorder(treea)
	UpperCAmelCase							=       merge_two_binary_trees(treea, treea)
	print("""Merged Tree is: """)
	print_preorder(merged_tree)

