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