#include <bits/stdc++.h>
using namespace std;
long long int mod = 1e9 + 7;
const double error = 1e-7;
const double PI = acos(-1);
mt19937 rng(
    (unsigned int)chrono::system_clock::now().time_since_epoch().count());
inline long long int MOD(long long int x, long long int m = mod) {
  long long int y = x % m;
  return (y >= 0) ? y : y + m;
}
const int inf = 1e9 + 2;
const unsigned long long int infl = 1e18 + 1;
const int nmax = 1e3 + 5;
const double IR = 1e5;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  int tc;
  cin >> tc;
  for (int cs = 1; cs <= tc; cs++) {
    double R, r;
    int k;
    cin >> R >> r >> k;
    R *= 2.0;
    r *= 2.0;
    R = IR / R;
    r = IR / r;
    double b = (R + r) / 2.0;
    double nr = abs(R - r) / 2.0;
    double h = 2.0 * nr * k;
    double dist = hypot(h, b);
    double x = dist - nr;
    double y = dist + nr;
    x = IR / x;
    y = IR / y;
    cout << setprecision(12) << abs(x - y) / 2 << '\n';
  }
}
