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