





'''simple docstring'''







snake_case_       :    int          =					(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)
snake_case_       :    List[Any]          =					(-1_53, -1, 0, 1.2, 2_00, "A", [], {}, None)





def     lowerCamelCase_ (					SCREAMING_SNAKE_CASE__ :     Union[str, Any]				)	->		Dict:
						if not isinstance(SCREAMING_SNAKE_CASE__,     SCREAMING_SNAKE_CASE__				) or n < 1:
												return False

						# Initialization of sum and number of digits.
						UpperCAmelCase_     : Optional[int]         =					0
						UpperCAmelCase_     : Union[str, Any]         =					0
						UpperCAmelCase_     : Dict         =					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_     : List[str]         =					n
						while temp > 0:
												UpperCAmelCase_     : Optional[int]         =					temp % 10
												total += rem**number_of_digits
												temp //= 10
						return n == total





def     lowerCamelCase_ (					SCREAMING_SNAKE_CASE__ :     List[Any]				)	->		Any:
						if not isinstance(SCREAMING_SNAKE_CASE__,     SCREAMING_SNAKE_CASE__				) or n < 1:
												return False

						# Init a "histogram" of the digits
						UpperCAmelCase_     : Union[str, Any]         =					[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
						UpperCAmelCase_     : str         =					0
						UpperCAmelCase_     : Optional[int]         =					0
						UpperCAmelCase_     : Optional[int]         =					n
						while temp > 0:
												UpperCAmelCase_     : Tuple         =					divmod(SCREAMING_SNAKE_CASE__,     10				)
												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__ :     Optional[Any]				)	->		Optional[Any]:
						if not isinstance(SCREAMING_SNAKE_CASE__,     SCREAMING_SNAKE_CASE__				) or n < 1:
												return False
						UpperCAmelCase_     : List[str]         =					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_ (					)	->		Optional[Any]:
						UpperCAmelCase_     : Optional[int]         =					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()







'''simple docstring'''







import numpy as np
from numpy import floataa
from numpy.typing import NDArray





def     lowerCamelCase_ (					SCREAMING_SNAKE_CASE__ :     NDArray[floataa],     SCREAMING_SNAKE_CASE__ :     NDArray[floataa]				)	->		NDArray[floataa]:
						UpperCAmelCase_  ,    UpperCAmelCase_     : Any         =					np.shape(SCREAMING_SNAKE_CASE__				)

						UpperCAmelCase_     : NDArray[floataa]         =					np.zeros((rows, 1),     dtype=SCREAMING_SNAKE_CASE__				)
						for row in reversed(range(SCREAMING_SNAKE_CASE__				)				):
												UpperCAmelCase_     : Union[str, Any]         =					0
												for col in range(row + 1,     SCREAMING_SNAKE_CASE__				):
																		total += coefficients[row, col] * x[col]

												UpperCAmelCase_     : str         =					(vector[row] - total) / coefficients[row, row]

						return x





def     lowerCamelCase_ (					SCREAMING_SNAKE_CASE__ :     NDArray[floataa],     SCREAMING_SNAKE_CASE__ :     NDArray[floataa]				)	->		NDArray[floataa]:
						UpperCAmelCase_  ,    UpperCAmelCase_     : List[Any]         =					np.shape(SCREAMING_SNAKE_CASE__				)
						if rows != columns:
												return np.array((),     dtype=SCREAMING_SNAKE_CASE__				)

						# augmented matrix
						UpperCAmelCase_     : NDArray[floataa]         =					np.concatenate((coefficients, vector),     axis=1				)
						UpperCAmelCase_     : Optional[Any]         =					augmented_mat.astype('''float64'''				)

						# scale the matrix leaving it triangular
						for row in range(rows - 1				):
												UpperCAmelCase_     : Optional[int]         =					augmented_mat[row, row]
												for col in range(row + 1,     SCREAMING_SNAKE_CASE__				):
																		UpperCAmelCase_     : Optional[Any]         =					augmented_mat[col, row] / pivot
																		augmented_mat[col, :] -= factor * augmented_mat[row, :]

						UpperCAmelCase_     : Optional[Any]         =					retroactive_resolution(
						    augmented_mat[:, 0:columns],     augmented_mat[:, columns : columns + 1]				)

						return x


if __name__ == "__main__":
					import doctest

					doctest.testmod()





