#include <bits/stdc++.h>
using namespace std;
int t, k;
double R, r;
int main() {
  cin >> t;
  cout << fixed << setprecision(10);
  while (t--) {
    cin >> R >> r >> k;
    double a = R + r, b = 2 * k * (R - r);
    double len = R - r;
    cout << 4 * R * r * len / (((a) * (a)) + ((b) * (b)) - ((len) * (len)))
         << '\n';
  }
}
