#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5;
long long h, c, t;
long double calc(long long x) {
  long double th = x * h + x * c;
  th /= (2 * x);
  return abs(th - t);
}
long long ternary_search(long long lo, long long hi) {
  while (lo < hi - 2) {
    long long m1 = (lo * 2 + hi) / 3;
    long long m2 = (lo + hi * 2) / 3;
    if (calc(m1) <= calc(m2))
      hi = m2;
    else
      lo = m1;
  }
  long double val = 1e9;
  long long idx = lo;
  for (long long i = lo; i <= hi; i++) {
    if (val > calc(i)) {
      idx = i;
      val = calc(i);
    }
  }
  return idx;
}
long double calc2(long long x) {
  long double th = x * h + (x - 1) * c;
  th /= (2 * x - 1);
  return abs(th - t);
}
long long ternary_search2(long long lo, long long hi) {
  while (lo < hi - 2) {
    long long m1 = (lo * 2 + hi) / 3;
    long long m2 = (lo + hi * 2) / 3;
    if (calc2(m1) <= calc2(m2))
      hi = m2;
    else
      lo = m1;
  }
  long double val = 1e9;
  long long idx = lo;
  for (long long i = lo; i <= hi; i++) {
    if (val > calc2(i)) {
      idx = i;
      val = calc2(i);
    }
  }
  return idx;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long tc;
  cin >> tc;
  while (tc--) {
    cin >> h >> c >> t;
    long long ans = ternary_search(1, 1e12);
    long long ans2 = ternary_search2(1, 1e12);
    if (calc(ans) < calc2(ans2))
      cout << ans * 2 << "\n";
    else
      cout << ans2 * 2 - 1 << "\n";
  }
  return 0;
}
