





from math import radians as angle_to_radians
from math import sin

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


def        __SCREAMING_SNAKE_CASE	(				__lowercase:		Dict  ,				__lowercase:		Tuple):



  '''simple docstring'''






  if not isinstance(__snake_case  ,				(int, float)):
    raise TypeError('''Invalid velocity. Should be a positive number.''')

  if not isinstance(__snake_case  ,				(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        __SCREAMING_SNAKE_CASE	(				__lowercase:		Union[str, Any]  ,				__lowercase:		Optional[Any]):



  '''simple docstring'''






  check_args(__snake_case  ,				__snake_case)
  __lowerCAmelCase								=					angle_to_radians(2 * angle)
  return round(init_velocity**2 * sin(__snake_case) / g  ,				2)


def        __SCREAMING_SNAKE_CASE	(				__lowercase:		Optional[Any]  ,				__lowercase:		Tuple):



  '''simple docstring'''






  check_args(__snake_case  ,				__snake_case)
  __lowerCAmelCase								=					angle_to_radians(__snake_case)
  return round(init_velocity**2 * sin(__snake_case) ** 2 / (2 * g)  ,				2)


def        __SCREAMING_SNAKE_CASE	(				__lowercase:		Union[str, Any]  ,				__lowercase:		List[Any]):



  '''simple docstring'''






  check_args(__snake_case  ,				__snake_case)
  __lowerCAmelCase								=					angle_to_radians(__snake_case)
  return round(2 * init_velocity * sin(__snake_case) / g  ,				2)


def        __SCREAMING_SNAKE_CASE	(				):



  '''simple docstring'''






  __lowerCAmelCase						,    __lowerCAmelCase								=					25, 20
  assert horizontal_distance(__snake_case  ,				__snake_case) == 40.97
  assert max_height(__snake_case  ,				__snake_case) == 3.73
  assert total_time(__snake_case  ,				__snake_case) == 1.74


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

      testmod()

      # Get input from user
      __lowercase				    =      float(input("""Initial Velocity: """).strip())

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




from __future__ import annotations
def 							UpperCAmelCase_   (				__snake_case		)	->     list[int]:







 """simple docstring"""


 if not list_of_ints:
  return []

 if min(__snake_case		) < 0:
  raise ValueError('''All numbers must be positive'''		)

 _lowercase				 =max(len(bin(__snake_case		)[2:]		) for x in list_of_ints		)
 return _msd_radix_sort(__snake_case	,		__snake_case		)
def 							UpperCAmelCase_   (				__snake_case	,		__snake_case		)	->     list[int]:







 """simple docstring"""


 if bit_position == 0 or len(__snake_case		) in [0, 1]:
  return list_of_ints

 _lowercase				 =[]
 _lowercase				 =[]
 # Split numbers based on bit at bit_position from the right
 for number in list_of_ints:
  if (number >> (bit_position - 1)) & 1:
   # number has a one at bit bit_position
   ones.append(__snake_case		)
  else:
   # number has a zero at bit bit_position
   zeros.append(__snake_case		)

    # recursively split both lists further
 _lowercase				 =_msd_radix_sort(__snake_case	,		bit_position - 1		)
 _lowercase				 =_msd_radix_sort(__snake_case	,		bit_position - 1		)

 # recombine lists
 _lowercase				 =zeros
 res.extend(__snake_case		)

 return res
def 							UpperCAmelCase_   (				__snake_case		)	->     List[str]:







 """simple docstring"""


 _lowercase				 =len(__snake_case		)
 if not list_of_ints or length == 1:
  return

 if min(__snake_case		) < 0:
  raise ValueError('''All numbers must be positive'''		)

 _lowercase				 =max(len(bin(__snake_case		)[2:]		) for x in list_of_ints		)
 _msd_radix_sort_inplace(__snake_case	,		__snake_case	,		0	,		__snake_case		)
def 							UpperCAmelCase_   (				__snake_case	,		__snake_case	,		__snake_case	,		__snake_case		)	->     Any:







 """simple docstring"""


 if bit_position == 0 or end_index - begin_index <= 1:
  return

 bit_position -= 1

 _lowercase				 =begin_index
 _lowercase				 =end_index - 1
 while i <= j:
  _lowercase				 =False
  if not (list_of_ints[i] >> bit_position) & 1:
   # found zero at the beginning
   i += 1
   _lowercase				 =True
  if (list_of_ints[j] >> bit_position) & 1:
   # found one at the end
   j -= 1
   _lowercase				 =True

  if changed:
   continue

  _lowercase ,       _lowercase				 =list_of_ints[j], list_of_ints[i]
  j -= 1
  if j != i:
   i += 1

 _msd_radix_sort_inplace(__snake_case	,		__snake_case	,		__snake_case	,		__snake_case		)
 _msd_radix_sort_inplace(__snake_case	,		__snake_case	,		__snake_case	,		__snake_case		)


if __name__ == "__main__":
  import doctest

  doctest.testmod()

