THINDIF - THINK DIFFERENT
In the figure, angle BAC is a right angle. AD is the perpendicular to BC. P is the middle point of BC. ADMN is a square. You will be given two numbers representing the length of BD (L) and the area of ADMN (A). You have to find the length of AP.
Input
The first line contains an integer T, (0 < T <= 100000) representing the number of test cases. The next T lines each contain two positive numbers L and A (0 < L, A <= 1.7E+308) as described above.
Output
You have to print the length of AP with two digits after decimal point. The required format is given in the sample.
Input: 3 5 25 4 24 7 56 Output: Case 1: 5.000000 Case 2: 5.000000 Case 3: 7.500000
Problem setter: Arifur Rahman Shojib
hide comments
rupakbis:
2023-02-19 16:18:47
picture is not clear. It is not visible
|
|
xuhd:
2015-09-12 09:36:42
Isn't AP = (L*L + A)/(2*L) ???!!
|
|
Fata Nugraha:
2015-04-16 08:23:16
now the problem statement is clear. Last edit: 2015-04-17 09:46:33 |
Added by: | Najmuzzaman |
Date: | 2015-04-08 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 JS-MONKEY |