





class       __lowerCAmelCase :






			def __init__(self					)  ->     int:


							'''simple docstring'''



							snake_case_		:					Dict			    =						[0]
							snake_case_		:					List[str]			    =						0






			def     lowerCamelCase						(self      ,							__magic_name__					)  ->     Any:


							'''simple docstring'''



							snake_case_		:					List[str]			    =						self.__heap[i]
							while i // 2 > 0:
											if self.__heap[i] > self.__heap[i // 2]:
															snake_case_		:					Optional[Any]			    =						self.__heap[i // 2]
															snake_case_		:					int			    =						temporary
											i //= 2






			def     lowerCamelCase						(self      ,							__magic_name__					)  ->     Any:


							'''simple docstring'''



							self.__heap.append(__magic_name__					)
							self.__size += 1
							self.__swap_up(self.__size					)






			def     lowerCamelCase						(self      ,							__magic_name__					)  ->     List[Any]:


							'''simple docstring'''



							while self.__size >= 2 * i:
											if 2 * i + 1 > self.__size:
															snake_case_		:					Any			    =						2 * i
											else:
															if self.__heap[2 * i] > self.__heap[2 * i + 1]:
																			snake_case_		:					Optional[int]			    =						2 * i
															else:
																			snake_case_		:					str			    =						2 * i + 1
											snake_case_		:					Dict			    =						self.__heap[i]
											if self.__heap[i] < self.__heap[bigger_child]:
															snake_case_		:					int			    =						self.__heap[bigger_child]
															snake_case_		:					Union[str, Any]			    =						temporary
											snake_case_		:					Any			    =						bigger_child






			def     lowerCamelCase						(self					)  ->     str:


							'''simple docstring'''



							snake_case_		:					List[Any]			    =						self.__heap[1]
							snake_case_		:					List[str]			    =						self.__heap[self.__size]
							self.__size -= 1
							self.__heap.pop()
							self.__swap_down(1					)
							return max_value






			@property
			def     lowerCamelCase						(self					)  ->     Tuple:


							'''simple docstring'''



							return self.__heap[1:]






			def __len__(self					)  ->     List[Any]:


							'''simple docstring'''



							return self.__size


if __name__ == "__main__":
			import doctest

			doctest.testmod()
			# create an instance of BinaryHeap
			lowerCAmelCase_												=       BinaryHeap()
			binary_heap.insert(6)
			binary_heap.insert(1_0)
			binary_heap.insert(1_5)
			binary_heap.insert(1_2)
			# pop root(max-values because it is max heap)
			print(binary_heap.pop())  # 15
			print(binary_heap.pop())  # 12
			# get the list and size after operations
			print(binary_heap.get_list)
			print(len(binary_heap))







from math import radians as angle_to_radians
from math import sin

# Acceleration Constant on Earth (unit m/s^2)
lowerCAmelCase_												=       9.80_665






def   lowerCamelCase_		(       _UpperCamelCase				,       _UpperCamelCase				)	->		None:






				"""simple docstring"""


				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   lowerCamelCase_		(       _UpperCamelCase				,       _UpperCamelCase				)	->		float:






				"""simple docstring"""


				check_args(_UpperCamelCase				,       _UpperCamelCase				)
				snake_case_		:					List[str]			    =						angle_to_radians(2 * angle				)
				return round(init_velocity**2 * sin(_UpperCamelCase				) / g				,       2				)






def   lowerCamelCase_		(       _UpperCamelCase				,       _UpperCamelCase				)	->		float:






				"""simple docstring"""


				check_args(_UpperCamelCase				,       _UpperCamelCase				)
				snake_case_		:					Tuple			    =						angle_to_radians(_UpperCamelCase				)
				return round(init_velocity**2 * sin(_UpperCamelCase				) ** 2 / (2 * g)				,       2				)






def   lowerCamelCase_		(       _UpperCamelCase				,       _UpperCamelCase				)	->		float:






				"""simple docstring"""


				check_args(_UpperCamelCase				,       _UpperCamelCase				)
				snake_case_		:					Optional[Any]			    =						angle_to_radians(_UpperCamelCase				)
				return round(2 * init_velocity * sin(_UpperCamelCase				) / g				,       2				)






def   lowerCamelCase_		(       )	->		None:






				"""simple docstring"""


				snake_case_    ,							snake_case_		:					Dict			    =						25, 20
				assert horizontal_distance(_UpperCamelCase				,       _UpperCamelCase				) == 40.97
				assert max_height(_UpperCamelCase				,       _UpperCamelCase				) == 3.73
				assert total_time(_UpperCamelCase				,       _UpperCamelCase				) == 1.74


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

	testmod()

	# Get input from user
	lowerCAmelCase_												=       float(input('''Initial Velocity: ''').strip())

	# Get input from user
	lowerCAmelCase_												=       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]''')
