#include <bits/stdc++.h>
int main() {
  int t, k;
  double R, r;
  for (scanf("%d", &t); t--;) {
    scanf("%lf%lf%d", &R, &r, &k);
    double lb = 1.0 / (2.0 * R);
    double rb = 1.0 / (2.0 * r);
    double h = k * (rb - lb);
    double t = (rb - lb) * 0.5;
    double x = lb + t, y = h;
    printf("%.8lf\n", t / (x * x + y * y - t * t));
  }
  return 0;
}
