#include <bits/stdc++.h>
using namespace std;
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    double R1, R2;
    int N;
    scanf("%lf%lf%d", &R2, &R1, &N);
    double rd = (1.0 / R1 - 1.0 / R2) / 4.0;
    double X = (1.0 / R1 + 1.0 / R2) / 4.0;
    double Y = N * 2.0 * rd;
    double r = rd / ((X * X + Y * Y) - rd * rd);
    printf("%.12lf\n", r);
  }
  return 0;
}
