SP7104 FTHEELF - Feanor The Elf

Description

Feanor is an elf, and of course, he really likes arrows and bows. Surprisingly enough, Feanor has a laptop, but he knows nothing about programming, so he requires your help. Feanor lives in a tower of height H, and he loves throwing arrows from the top of it. He had a good amount of intesive training and he knows that he always throws his arrows with the same initial speed V . He wants you to make a program that given H and V returns the maximum distance that a Feanor’s arrow can reach when it hits the ground, measured from the base of the tower. With this information, he will be able to place a nice circular fence to prevent deoriented little elves from being killed. Newtonian laws apply in Feanor’s world and the gravity has the same strength as in ours. These laws can be summarized as follows: • The position of Feanor is assumed to be a point. The same occurs with the position of his arrow at each moment in time. • The initial speed V of the arrow can be expressed as Vx $ ^{2} $ + Vy $ ^{2} $ = V $ ^{2} $ , where Vx and Vy are the horizontal and vertical components of V , respectively. Speed Vx is always non- negative, while speed Vy is positive if the arrow is thrown up, and negative if the arrow is thrown down. • The initial position of the arrow is the position of Feanor. • The horizontal position of the arrow (relative to Feanor’s position) at time t is x(t) = Vx \* t. • The vertical position of the arrow (relative to Feanor’s position) at time t is y(t) = Vy \* t − gt $ ^{2} $ / 2, where g = 9.8 m/s2 .

Input Format

The input contains several test cases. Each test case is described in a single line that contains two integers V and H separated by a single space. The value V is the initial speed of Feanor’s arrow measured in m/s (0 (0 space and should not be processed as a test case.

Output Format

For each test case output a single line with the radius of Feanor’s fence in meters, rounded up to 6 decimal digits (he wants to be sure that he doesn’t kill those cute little elves).