1025: Midterm Exam Problem 4

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:194 Solved:16

Description

Consider an object  of mass m is thrown a position (x=0, y=0) with an initial velocity v (m/s) and an elevation angle t (in radian). The land at y=0 starting from x=0 falls a depth of 5 at x=10. Find the position of the object at its first impact. For simplicity the acceleration due to gravitation of earth is 10(m/s^2). In this program the input are the initial velocity v (m/s) and elevation angle t (in radian) and the output is the position of the first impact (xi,yi). 

Input

15.0 1.0

Output

23.281 -5.000

Sample Input Copy

10.0 1.0

Sample Output Copy

9.093 0.000