I thought it might be fun to challenge our members and see what sort of coders we have on board. On a scale of 1-10, this problem is about a 2. It is a straight-forward problem where one just needs to read the input, and plug it into a formula. You should also not that the test data I provide here is not complete. I may have a couple of test cases that one would not anticipate in the real world. So anyway, if you want, solve the problem in what ever language you prefer. As long as I can feed it the test data, the language does not matter. So here is the problem:

During one WWII battle on the Sea of Japan, the USS Missouri took damage to the system responsible for controlling the elevation of its 15” guns, locking them at a 45º. This proves to be problematic, because the angle of the guns determines the range. At the same time, Marines are pinned down on various places and are requesting fire support.

A bos'un on board notes the following; The deck guns can launch the 2700 pound shells at a velocity of 820 m/s, with a maximum range of about 20 miles. Since the amount of gunpowder loaded with each shot determines the velocity with which the bullet leaves the barrel, by varying the amount of gunpowder, the range can be controlled, and they can save all of the Marines. The bos’un also notes that simple Newtonian physics can be used to determine with how much velocity the projectile must be launched in order to hit the target.

The first step is to calculate how much time is needed for the projectile to travel a given distance, and that is given by the following (simplified) formula:

time=sqrt(distance/(4.9))

Once the time is calculated, then a second formula can be used to determine the acceleration needed to travel that distance:

acceleration=distance/time

Finally, the velocity with which the bullet must leave the barrel can be calculated:

velocity=sqrt(acceleration^2+acceleration^2 )

*******************************************

Sample input:

The input will consist of an integer representing the number of test cases, followed by the necessary distance, in yards.

Example:

3

1609

16090

32180

Sample output:

Velocity needed is: 125.57

Velocity needed is: 397.09

Velocity needed is: 561.57