#include <bits/stdc++.h>
using namespace std;
long long dx[] = {0, -1, 0, 1, 0, 0}, dy[] = {-1, 0, 1, 0, 0, 0},
          dz[] = {0, 0, 0, 0, -1, 1};
const long long N = 1e5 + 7;
long long n, m, p;
inline long long read() {
  long long first = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    first = (first << 1) + (first << 3) + (ch ^ 48);
    ch = getchar();
  }
  return first * f;
}
long long h, c, t;
inline double sum(long long first) {
  return fabs(t - (h * 1.000 * (first / 2 + 1) + c * 1.000 * (first / 2)) /
                      first * 1.000);
}
inline void solve() {
  cin >> h >> c >> t;
  if (h == t)
    cout << 1 << endl;
  else if ((h + c) / 2 >= t)
    cout << 2 << endl;
  else if (t % ((h + c) / 2) == 0)
    cout << t / (h + c) << endl;
  else {
    long long num = (c - h) / (h + c - 2 * t);
    long long ans = 0;
    double mi = 0x3f3f3f3f;
    for (long long i = num - 10; i <= num + 10; i++) {
      if (i % 2 == 0 || i <= 0) continue;
      double temp = sum(i);
      if (mi > temp) mi = temp, ans = i;
    }
    cout << ans << endl;
  }
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  long long _;
  cin >> _;
  while (_--) solve();
  return 0;
}
