intmain() { inttests; doubleB, h, H; doubler, R; doubleedge; inti; freopen("c://uva_in.txt", "r", stdin); scanf("%d", &tests); for (i=0; i<tests; i++) { scanf("%lf%lf", &B, &H); edge=sqrt(B*B/4+H*H); R=B*H/ (2*edge+B); h=H; r=R; while (r>=0.000001) { h-=2*r; r=h*R/H; } printf("%13lf/n", (H-h) *PI); if (i<tests-1) { printf("/n"); } } return0; }