📄 2507.txt
字号:
Memory:52K Time:0MS
Language:G++ Result:Accepted
Source
#include "stdio.h"
#include "math.h"
int main()
{
double x, y, c, a, b, w, t;
while( scanf( "%lf%lf%lf", &x, &y, &c ) == 3 )
{
b = x;
if( b > y ) b = y;
a = 0;
while( b - a > 1e-7 )
{
w = ( a + b ) / 2;
t = w / ( w / sqrt( y*y - w*w ) + w / sqrt( x*x - w*w ) );
if( fabs( t-c ) < 1e-7 ) break;
if( t > c ) a = w;
else b = w;
}
printf( "%.3lf\n", w );
}
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -