#include <bits/stdc++.h>
using namespace std;
using ll = long long;
double h, c, t;
double f(ll i) { return (ll((i + 1) / 2) * h + ll(i / 2) * c) / (double)i; }
void solve() {
  cin >> h >> c >> t;
  if (t >= h) {
    cout << 1 << endl;
    return;
  }
  if (t <= (h + c) / 2) {
    cout << 2 << endl;
    return;
  }
  ll low = 1;
  ll len = 1ll << 38;
  ll steps;
  while (len >= 1) {
    ll mid = low + len / 2;
    double cavg = f(mid);
    if (cavg >= t) {
      steps = mid;
      low = mid;
    }
    len /= 2;
  }
  ll ans = 2;
  double avg = (h + c) / 2.0;
  for (ll i = max<int>(1, steps - 100); i <= steps + 100; ++i) {
    double cavg = f(i);
    if (fabs(t - cavg) < fabs(t - avg)) {
      ans = i;
      avg = cavg;
    }
  }
  cout << ans << endl;
}
int main() {
  int t;
  cin >> t;
  while (t--) solve();
  return 0;
}
