



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


def       UpperCamelCase(  __UpperCamelCase							:		int			):
		if not isinstance(__UpperCamelCase					,__UpperCamelCase			) or n < 1:
				return False

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


def       UpperCamelCase(  __UpperCamelCase							:		int			):
		if not isinstance(__UpperCamelCase					,__UpperCamelCase			) or n < 1:
				return False

		# Init a "histogram" of the digits
		lowerCAmelCase_      :					List[str]     =			[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
		lowerCAmelCase_      :					Dict     =			0
		lowerCAmelCase_      :					Any     =			0
		lowerCAmelCase_      :					List[Any]     =			n
		while temp > 0:
				lowerCAmelCase_      :					List[Any]     =			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       UpperCamelCase(  __UpperCamelCase							:		int			):
		if not isinstance(__UpperCamelCase					,__UpperCamelCase			) or n < 1:
				return False
		lowerCAmelCase_      :					Dict     =			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       UpperCamelCase(  ):
		lowerCAmelCase_      :					Tuple     =			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()










from math import radians as angle_to_radians
from math import sin

# Acceleration Constant on Earth (unit m/s^2)
A__  :  Any       = 9.8_0_6_6_5


def       UpperCamelCase(  __UpperCamelCase							:		float					,__UpperCamelCase							:		float			):

		# Ensure valid instance
		if not isinstance(__UpperCamelCase					,(int, float)			):
				raise TypeError('''Invalid velocity. Should be a positive number.'''			)

		if not isinstance(__UpperCamelCase					,(int, float)			):
				raise TypeError('''Invalid angle. Range is 1-90 degrees.'''			)

		# Ensure valid angle
		if angle > 90 or angle < 1:
				raise ValueError('''Invalid angle. Range is 1-90 degrees.'''			)

		# Ensure valid velocity
		if init_velocity < 0:
				raise ValueError('''Invalid velocity. Should be a positive number.'''			)


def       UpperCamelCase(  __UpperCamelCase							:		float					,__UpperCamelCase							:		float			):
		check_args(__UpperCamelCase					,__UpperCamelCase			)
		lowerCAmelCase_      :					Optional[Any]     =			angle_to_radians(2 * angle			)
		return round(init_velocity**2 * sin(__UpperCamelCase			) / g					,2			)


def       UpperCamelCase(  __UpperCamelCase							:		float					,__UpperCamelCase							:		float			):
		check_args(__UpperCamelCase					,__UpperCamelCase			)
		lowerCAmelCase_      :					Any     =			angle_to_radians(__UpperCamelCase			)
		return round(init_velocity**2 * sin(__UpperCamelCase			) ** 2 / (2 * g)					,2			)


def       UpperCamelCase(  __UpperCamelCase							:		float					,__UpperCamelCase							:		float			):
		check_args(__UpperCamelCase					,__UpperCamelCase			)
		lowerCAmelCase_      :					Dict     =			angle_to_radians(__UpperCamelCase			)
		return round(2 * init_velocity * sin(__UpperCamelCase			) / g					,2			)


def       UpperCamelCase(  ):
		lowerCAmelCase_ ,  lowerCAmelCase_      :					Any     =			25, 20
		assert horizontal_distance(__UpperCamelCase					,__UpperCamelCase			) == 4_0.9_7
		assert max_height(__UpperCamelCase					,__UpperCamelCase			) == 3.7_3
		assert total_time(__UpperCamelCase					,__UpperCamelCase			) == 1.7_4


if __name__ == "__main__":
						from doctest import testmod

						testmod()

						# Get input from user
						A__  :  List[Any]       = float(input('''Initial Velocity: ''').strip())

						# Get input from user
						A__  :  Dict       = float(input('''angle: ''').strip())

						# Print results
						print()
						print('''Results: ''')
						print(F'''Horizontal Distance: {horizontal_distance(init_vel, angle)!s} [m]''')
						print(F'''Maximum Height: {max_height(init_vel, angle)!s} [m]''')
						print(F'''Total Time: {total_time(init_vel, angle)!s} [s]''')





