#include <bits/stdc++.h>
using namespace std;
long long check(long long n, long long m, long long x, long long y) {
  return x >= 0 && x < n && y >= 0 && y < m;
}
void pr() { cout << '\n'; }
template <class A, class... B>
void pr(const A &a, const B &...b) {
  cout << a << (sizeof...(b) ? " " : "");
  pr(b...);
}
template <class A>
void PR(A a, long long n) {
  for (long long i = (long long)(0); i < (long long)(n); i++) {
    if (i) cout << ' ';
    cout << a[i];
  }
  cout << '\n';
}
const long long MAX = 1e9 + 7, MAXL = 1LL << 61,
                dx[8] = {-1, 0, 1, 0, -1, -1, 1, 1},
                dy[8] = {0, 1, 0, -1, -1, 1, 1, -1};
void Main() {
  long long T;
  cin >> T;
  while (T--) {
    long long h, c, t;
    cin >> h >> c >> t;
    if (t <= (h + c) / 2) {
      pr(2);
      continue;
    }
    long long l = 0, r = MAX;
    while (l + 1 < r) {
      long long m = (l + r) / 2;
      double d = m * h + (m - 1) * c;
      d /= m * 2 - 1;
      if (d <= t)
        r = m;
      else
        l = m;
    }
    double M = MAXL;
    long long ans;
    for (long long i = (long long)(-3); i < (long long)(3); i++) {
      long long m = l + i;
      if (m <= 0) continue;
      double d = m * h + (m - 1) * c;
      d /= m * 2 - 1;
      double c = fabs(t - d);
      if (c < M) {
        M = c;
        ans = m * 2 - 1;
      }
    }
    pr(ans);
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  Main();
  return 0;
}
