61.329
225.020
0.000
/*
Author: 2486
Memory: 164 KB Time: 0 MS
Language: C++ Result: Accepted
*/
//从边的角度思考
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
using namespace std;
const double PI=3.1415926535898;
const double eps=1e-7;
double iL,t,c,Ls;
bool C(double m){
double r=m+iL*iL/(4.0*m);
return asin(iL/r)*r>=Ls;
}
int main(){
while(~scanf("%lf%lf%lf",&iL,&t,&c)){
if(iL<0||t<0||c<0)break;
Ls=(1.0+t*c)*iL;
double lb=0,ub=iL/2.0;
while(ub-lb>eps){
double mid=(ub+lb)/2.0;
if(C(mid)){
ub=mid;
}
else lb=mid;
}
printf("%.3lf\n",ub);
}
return 0;
}
以上的是通过相似三角形的思维,m/(L/2)=(L/2)/(2R-m)
一下是通过角度a=L/R,所对应的角
/*
Author: 2486
Memory: 176 KB Time: 0 MS
Language: C++ Result: Accepted
*/
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
//从角的角度思考
using namespace std;
const double PI=acos(-1.0);
const double eps=1e-15;
double iL,t,c,Ls;
bool C(double m){
if(((iL/sin(m))/2)*m*2.0>=Ls)return true;
return false;
}
int main(){
while(~scanf("%lf%lf%lf",&iL,&t,&c)){
if(iL<0||t<0||c<0)break;
Ls=(1.0+t*c)*iL;
double lb=0,ub=PI/2.0;
while(ub-lb>eps){
double mid=(ub+lb)/2.0;
if(C(mid)){
ub=mid;
}
else lb=mid;
}
printf("%.3lf\n",(iL/2/sin(ub))-iL/2/tan(ub));
}
return 0;
}