Contents ...
udn網路城邦
UVA 10215 cpp
2025/01/25 00:34
瀏覽39
迴響0
推薦0
引用0
// UVA 10215 CPP


#include <cstdio>

#include <cmath>


double esp = 1e-8;


int main()

{

double L, W, x;

while (~scanf("%lf%lf", &L, &W))  {

x = (L+W-sqrt(L*L-L*W+W*W))/6.0+esp;

printf("%.3lf 0.000 %.3lf\n",x,esp+(W<L?0.5*W:0.5*L));

}

return 0;

}
全站分類:知識學習 考試升學
上一則: [Python] UVa 10229
下一則: UVa 10162 cpp

限會員,要發表迴響,請先登入