#include <bits/stdc++.h>
using namespace std;
struct Tpoint {
  double x, y;
  Tpoint() {}
  Tpoint(double x1, double y1) {
    x = x1;
    y = y1;
  }
  Tpoint operator-(const Tpoint &t) { return Tpoint(x - t.x, y - t.y); }
  double dis() { return x * x + y * y; }
};
double R, r;
int k;
struct Tprogram {
  void open() {
    freopen("1.in", "r", stdin);
    freopen("1.out", "w", stdout);
  }
  void close() {}
  void init() {
    scanf("%lf%lf%d", &R, &r, &k);
    Tpoint o = Tpoint((R + r) / (4 * R * r), k * (R - r) / (2 * R * r));
    double d = sqrt(o.dis()), r1 = (R - r) / (4 * R * r);
    printf("%.10lf\n", 0.5 / (d - r1) - 0.5 / (d + r1));
  }
  void work() {}
} Program;
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    Program.init();
    Program.work();
  }
  return 0;
}
