#include <bits/stdc++.h>
double R, r, k;
int t;
int main() {
  scanf("%d", &t);
  while (t--) {
    scanf("%lf%lf%lf", &R, &r, &k);
    printf("%.9f\n", 1.0 / (1.0 / (R - r) + k * k * (R - r) / R / r));
  }
}
