#include <bits/stdc++.h>
using namespace std;
struct point {
  double x, y;
  point(double _x = 0, double _y = 0) : x(_x), y(_y) {}
  point inverse(double k) const {
    double t = k * k / (x * x + y * y);
    return point(x * t, y * t);
  }
  double dist(const point &o) const { return hypot(x - o.x, y - o.y); }
};
pair<point, point> getIntersection(double x0, double y0, double r) {
  double t = sqrt(r * r * x0 * x0 / (x0 * x0 + y0 * y0));
  double x1 = x0 + t;
  double x2 = x0 - t;
  double k = y0 / x0;
  return make_pair(point(x1, x1 * k), point(x2, x2 * k));
}
int main() {
  int T;
  scanf("%d", &T);
  while (T > 0) {
    T--;
    double R, r;
    int k;
    scanf("%lf%lf%d", &R, &r, &k);
    double t = (R - r) / (4 * R * r);
    pair<point, point> p = getIntersection((R + r) / (4 * R * r), 2 * k * t, t);
    double ans = p.first.inverse(1.0).dist(p.second.inverse(1.0)) / 2;
    printf("%.10lf\n", ans);
  }
  return 0;
}
