#include <bits/stdc++.h>
using namespace std;
long double h, c, t;
long long bs() {
  long long lo = 0, hi = 1e17, mid;
  long long bestN = -1;
  long double bestDif = 1e9;
  while (lo <= hi) {
    mid = (lo + hi) / 2;
    long double tmp = ((mid + 1) * h + mid * c) / (2 * (mid + 1) - 1);
    long double error = abs(tmp - t);
    if (tmp > t) {
      lo = mid + 1;
    } else {
      hi = mid - 1;
    }
    if (error < bestDif) {
      bestN = mid;
      bestDif = error;
    } else if (error == bestDif) {
      if (mid < bestN) {
        bestN = mid;
      }
    }
  }
  long long ans = (2 * (bestN + 1)) - 1;
  double avg = (h + c) / 2;
  if (abs(avg - t) <= bestDif && abs(h - t) > bestDif) {
    return 2;
  }
  if (abs(h - t) <= bestDif) {
    return 1;
  }
  return ans;
}
long long solve() {
  if (t >= h) return 1;
  double avg = (h + c) / 2;
  if (t == avg) return 2;
  if (t < avg) {
    return 2;
  }
  return bs();
}
int main() {
  int TC;
  cin >> TC;
  while (TC--) {
    cin >> h >> c >> t;
    long long ans = solve();
    cout << ans << "\n";
  }
}
