
SCREAMING_SNAKE_CASE__     :    int      							=					(1, 153, 370, 371, 1_634, 24_678_051, 115_132_219_018_763_992_565_095_597_973_971_522_401)
SCREAMING_SNAKE_CASE__     :    tuple      							=					(-153, -1, 0, 1.2, 200, "A", [], {}, None)




def 				__magic_name__				(     __lowerCAmelCase			:		int							)    ->     bool:
				if not isinstance(__lowerCAmelCase	,						__lowerCAmelCase							) 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 				__magic_name__				(     __lowerCAmelCase			:		int							)    ->     bool:
				if not isinstance(__lowerCAmelCase	,						__lowerCAmelCase							) 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(__lowerCAmelCase	,						10							)
								digit_histogram[rem] += 1
								digit_total += 1

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

				return n == total




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




def 				__magic_name__				(     )    ->     List[str]:
				__lowerCamelCase					      =			int(input('''Enter an integer to see if it is an Armstrong number: '''							).strip()							)
				print(f'''{num} is {'' if armstrong_number(__lowerCAmelCase							) else 'not '}an Armstrong number.'''							)
				print(f'''{num} is {'' if narcissistic_number(__lowerCAmelCase							) else 'not '}an Armstrong number.'''							)
				print(f'''{num} is {'' if pluperfect_number(__lowerCAmelCase							) else 'not '}an Armstrong number.'''							)


if __name__ == "__main__":
					import doctest

					doctest.testmod()
					main()





def 				__magic_name__				(     __lowerCAmelCase			:		list	,						__lowerCAmelCase			:		int	,						__lowerCAmelCase			:		int	,						__lowerCAmelCase			:		int							)    ->     int:
				__lowerCamelCase					      =			int((lower_bound + upper_bound) // 2							)
				if array[r] == value:
								return r
				if lower_bound >= upper_bound:
								return -1
				if array[r] < value:
								return binary_search(__lowerCAmelCase	,						r + 1	,						__lowerCAmelCase	,						__lowerCAmelCase							)
				else:
								return binary_search(__lowerCAmelCase	,						__lowerCAmelCase	,						r - 1	,						__lowerCAmelCase							)




def 				__magic_name__				(     __lowerCAmelCase			:		int	,						__lowerCAmelCase			:		list							)    ->     list:
				__lowerCamelCase					      =			0
				if matrix[index][0] == value:
								return [index, 0]
				while index < len(__lowerCAmelCase							) and matrix[index][0] < value:
								__lowerCamelCase					      =			binary_search(matrix[index]	,						0	,						len(matrix[index]							) - 1	,						__lowerCAmelCase							)
								if r != -1:
												return [index, r]
								index += 1
				return [-1, -1]


if __name__ == "__main__":
					import doctest

					doctest.testmod()



