#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int inf = 1e9;
const double eps = 2e-6;
int h, c, t;
double f(ll i) { return abs(t - (h * (i + 1) + c * i) / (2.0 * i + 1)); }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int T;
  cin >> T;
  while (T--) {
    cin >> h >> c >> t;
    if (t <= (h + c) / 2.0) {
      cout << "2\n";
      continue;
    }
    int a = 0, b = 1e9;
    while (b - a >= 5) {
      int mid = (a + b) / 2;
      if (f(mid) > f(mid + 1))
        a = mid;
      else
        b = mid + 1;
    }
    for (int i = a; i <= b; ++i)
      if (f(a) > f(i)) a = i;
    cout << 2 * a + 1 << '\n';
  }
}
