import java.util.*;
import java.lang.*;
import java.io.*;
/*d=7, n=2, s=6, e=7, Output is: 7.0000000000
d=5, n=3, s=5, e=5, Output is: 2.5000000006
d=3, n=3, s=0, e=1, Output is: 1.5000000007
d=9, n=10, s=5, e=6, Output is: 1.0000000000
d=6, n=2, s=1, e=6, Output is: 6.0000000000
d=5, n=3, s=4, e=5, Output is: 2.5000000006*/
class Ideone
{
{
func(7, 2, 6, 7);
func(5, 3, 5, 5);
func(3, 3, 0, 1);
func(9, 10, 5, 6);
func(6, 2, 1, 6);
func(5, 3, 4, 5);
}
static void func(double d, int n, double s, double e)
{
double high = d, low = 0, epsilon = 0.000001;
while (low + epsilon < high)
{
double mid = (low + high)/2;
int gapsOnLeft = (int)(s/mid);
if (gapsOnLeft + 1 > n)
gapsOnLeft = n - 1;
int gapsOnRight = n - gapsOnLeft - 2;
double leftOffset = mid*gapsOnLeft;
double rightOffset = d - mid*gapsOnRight;
if (leftOffset + mid <= rightOffset && rightOffset >= e)
low = mid;
else
high = mid;
}
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKmQ9Nywgbj0yLCBzPTYsIGU9NywgT3V0cHV0IGlzOiA3LjAwMDAwMDAwMDAKZD01LCBuPTMsIHM9NSwgZT01LCBPdXRwdXQgaXM6IDIuNTAwMDAwMDAwNgpkPTMsIG49Mywgcz0wLCBlPTEsIE91dHB1dCBpczogMS41MDAwMDAwMDA3CmQ9OSwgbj0xMCwgcz01LCBlPTYsIE91dHB1dCBpczogMS4wMDAwMDAwMDAwCmQ9Niwgbj0yLCBzPTEsIGU9NiwgT3V0cHV0IGlzOiA2LjAwMDAwMDAwMDAKZD01LCBuPTMsIHM9NCwgZT01LCBPdXRwdXQgaXM6IDIuNTAwMDAwMDAwNiovCmNsYXNzIElkZW9uZQp7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgdGhyb3dzIGph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