407106: GYM102697 077 That Hertz!

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

077. That Hertz!time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

You are an event organizer, tasked with planning an event in a very large, outdoors area. However, you only have two very powerful speakers, which are placed on both ends of the stage.

You assume that there will be crowds spanning large lengths at this meeting, and need to figure out how long it takes for the sound from the stage to reach the furthest attendees of the event.

However, an engineer helping to organize the event reminds you that the speed of sound is varied, depending on the temperature. As you are planning the event in Syracuse, this is a serious problem, as the temperatures are very unpredictable.

The approximate formula for the speed of sound (assuming there is no humidity in the air, is):

$$$V = (331.3 + .606∙\vartheta)$$$

Where $$$V$$$ is the speed of sound in meters per second, and $$$\vartheta$$$ is the temperature of the air, in degrees Celsius.

Input

The first line of the input will denote integer $$$n$$$, the number of test cases following the line. The lines following will contain two values each, the first being the integer temperature $$$\vartheta$$$, and second being the distance between the stage and the furthest edges of the crowd, measured in km.

Output

Output the time it takes for the sound from the stage to reach the furthest edges of the crowd in seconds, rounded to the nearest hundred.

ExampleInput
5
7 3.6
24 1.1
17 4.4
-1 1.2
8 5.9
Output
10.73
3.18
12.88
3.63
17.55

加入题单

算法标签: