```cpp
#include <iostream>
#include <cstdio>
using namespace std;
int s,a,b;
double mid,mint,maxt,l,r;
bool ok(double t)
{
if (((s-a*t)/(b-a))==((a+b)*(s-t*b)/(2*a*b-2*b*b))) return 1;return 0;
}
int main()
{
scanf("%d%d%d",&s,&a,&b);
maxt=25; mint=4.8; l=mint; r=maxt;
while (l<r)
{
mid=(l+r)/2;
if (ok(mid)) r=mid;else l=mid;
}
printf("%.6f",mid);
return 0;
}
这个、
```
by syh0313 @ 2017-05-30 21:06:23
因为你傻
by jerryjiayining @ 2017-09-12 16:37:13