CHOTU  Faridi and Yadav
Once it happend that the two scientists(perhaps mad) Mr Yadav and Mr Faridi discovered an unusual radioactive compound named mahobanium , that decays at constant rate. And as the compund decays it looses weight.The two of them start playing a game, in which both of them sit at equal distance from a point C , one sits in west and the other in east. Being famous scientists a lot of students have come to see them(basically not to them but the compund , they had discovered) .The students have gathered around the two .The scientist also have a small robot , named CHOTU.
Initially Mr Faridi has all the stones of mahobanium compound with him and all have equal weight. Faridi gives stones (one at a time)to CHOTU and directs him to show the compound to one of the student (who has'nt seen the compound yet) and then immediately go towards Mr Yadav.(Assume no loss of time in showing the stone to students , also CHOTU follows the shortest path while moving and always runs at same speed = 5m/s).The students , actually have placed themselves in such a way that all the stones that have reached Yadav have the same weight(Assume that radioactive decay starts as soon as it is placed in CHOTU'S hand).A child can place itself to atmost distance of X units from the centre along east or west . and to atmost distance of Y units from the centre C along north or south.
Given test cases t ( < 1000 ) the values of X and Y (say X > Y) and (X < 1000 ) , scratch your brain to find out the maximum distance that can exist between Mr Yadav and Faridi so that above conditions are always followed.Print your answer upto 3 digits of decimal point.
Input
First Line has test cases t ( < 1000 )
The next t lines has two Integers X and Y separated by space[the values of X and Y (say X > Y) and (X < 1000 )]
Output
Print Required answer upto 3 digits of decimal point.
Sample Input
1
4 2
Sample Output
6.928
hide comments
pandey101299:
20190331 09:12:39
so easy use only math 

dharmendrak:
20190107 07:20:00
using float cost me wasted


markaman:
20181229 14:23:08
If u love math ac in 3 minute including questions reading


shivendra_420:
20170203 11:34:52
solution is accepted on using double!!


kdd405_:
20170128 20:26:21
just use double instead of float...


piyushmittal:
20170123 19:05:34
use double instead of float , it costed me two wrong answer.


imperfectboy:
20170118 07:50:03
float is enough !! AC in ONE go :D 

shubham_cs_iet:
20170112 15:12:40
piece of cake.:)


rajeev_mnnit:
20160817 12:49:36
use double inplace of float


dushyant_bgs:
20160623 10:54:11
Nice Question on Geometry!! 
Added by:  aqfaridi 
Date:  20140119 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 
Resource:  Own 