#include <bits/stdc++.h>
using namespace std;
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    double R, r, K;
    scanf("%lf%lf%lf", &R, &r, &K);
    double a = (R - r) / (4 * R * r),
           L = hypot((R + r) / (4 * R * r), K * 2 * a);
    printf("%.10lf\n", 0.5 * (1 / (L - a) - 1 / (L + a)));
  }
  return 0;
}
