
from math import radians as angle_to_radians
from math import sin

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


def       UpperCAmelCase_					(  __lowerCAmelCase		,   __lowerCAmelCase		)	->  int:

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

    if not isinstance(__lowerCAmelCase		,   (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_					(  __lowerCAmelCase		,   __lowerCAmelCase		)	->  str:
    check_args(__lowerCAmelCase		,   __lowerCAmelCase		)
    __lowercase						:     List[str]		      =    angle_to_radians(2 * angle		)
    return round(init_velocity**2 * sin(__lowerCAmelCase		) / g		,   2		)


def       UpperCAmelCase_					(  __lowerCAmelCase		,   __lowerCAmelCase		)	->  int:
    check_args(__lowerCAmelCase		,   __lowerCAmelCase		)
    __lowercase						:     int		      =    angle_to_radians(__lowerCAmelCase		)
    return round(init_velocity**2 * sin(__lowerCAmelCase		) ** 2 / (2 * g)		,   2		)


def       UpperCAmelCase_					(  __lowerCAmelCase		,   __lowerCAmelCase		)	->  List[str]:
    check_args(__lowerCAmelCase		,   __lowerCAmelCase		)
    __lowercase						:     Optional[int]		      =    angle_to_radians(__lowerCAmelCase		)
    return round(2 * init_velocity * sin(__lowerCAmelCase		) / g		,   2		)


def       UpperCAmelCase_					(  )	->  List[Any]:
    __lowercase						:     List[Any]		      =    25, 20
    assert horizontal_distance(__lowerCAmelCase		,   __lowerCAmelCase		) == 40.97
    assert max_height(__lowerCAmelCase		,   __lowerCAmelCase		) == 3.73
    assert total_time(__lowerCAmelCase		,   __lowerCAmelCase		) == 1.74


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

    testmod()

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

    # Get input from user
    __lowerCAmelCase   :     Any      =						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

from collections import Counter


def       UpperCAmelCase_					(  __lowerCAmelCase		)	->  list[int]:
    __lowercase						:     Any		      =    [True] * n
    __lowercase						:     str		      =    False
    __lowercase						:     int		      =    False
    __lowercase						:     List[Any]		      =    True

    for i in range(3		,   int(n**0.5 + 1		)		,   2		):
        __lowercase						:     List[str]		      =    i * 2
        while index < n:
            __lowercase						:     List[Any]		      =    False
            __lowercase						:     Dict		      =    index + i

    __lowercase						:     Tuple		      =    [2]

    for i in range(3		,   __lowerCAmelCase		,   2		):
        if is_prime[i]:
            primes.append(__lowerCAmelCase		)

    return primes


def       UpperCAmelCase_					(  __lowerCAmelCase		)	->  list[list[int]]:
    __lowercase						:     Optional[int]		      =    str(__lowerCAmelCase		)
    __lowercase						:     List[str]		      =    []
    __lowercase						:     int		      =    ['''0''', '''1''', '''2''', '''3''', '''4''', '''5''', '''6''', '''7''', '''8''', '''9''']

    for duplicate in Counter(__lowerCAmelCase		) - Counter(set(__lowerCAmelCase		)		):
        __lowercase						:     Union[str, Any]		      =    [int(number_str.replace(__lowerCAmelCase		,   __lowerCAmelCase		)		) for digit in digits]
        replacements.append(__lowerCAmelCase		)

    return replacements


def       UpperCAmelCase_					(  __lowerCAmelCase = 8		)	->  int:
    __lowercase						:     Tuple		      =    set()

    # Filter primes with less than 3 replaceable digits
    __lowercase						:     int		      =    {
        x for x in set(prime_sieve(1_000_000		)		) if len(str(__lowerCAmelCase		)		) - len(set(str(__lowerCAmelCase		)		)		) >= 3
    }

    for prime in primes:
        if prime in numbers_checked:
            continue

        __lowercase						:     str		      =    digit_replacements(__lowerCAmelCase		)

        for family in replacements:
            numbers_checked.update(__lowerCAmelCase		)
            __lowercase						:     List[Any]		      =    primes.intersection(__lowerCAmelCase		)

            if len(__lowerCAmelCase		) != family_length:
                continue

            return min(__lowerCAmelCase		)

    return -1


if __name__ == "__main__":
 print(solution())


