#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const int maxn = 100000 + 5;
int h, c, t;
double fun(double x) {
  return fabs((double)((x + 1) * h + (x)*c) / (double)(2 * x + 1) - (double)t);
}
int main() {
  int T;
  cin >> T;
  while (T--) {
    scanf("%d%d%d", &h, &c, &t);
    int r, l;
    if (t >= h) {
      cout << 1 << endl;
      continue;
    } else if (t <= (h + c) / 2) {
      cout << 2 << endl;
      continue;
    } else {
      r = 0x3f3f3f3f;
      l = 0;
      int mid1 = (r - l) / 3 + l;
      int mid2 = (2 * (r - l)) / 3 + l;
      int tim = 1000;
      while (tim--) {
        mid1 = min((r - l) / 3 + l, r);
        mid2 = min((2 * (r - l)) / 3 + l + 1, r);
        if (fun(mid1) < fun(mid2)) {
          r = mid2;
        } else {
          l = mid1;
        }
      }
      int ans = 0x3f3f3f3f;
      double save = 0x3f3f3f3f;
      for (int i = l - 100; i <= r + 100; i++) {
        if (i < 0) {
          i = 0;
        }
        if (fun(i) < save) {
          save = fun(i);
          ans = i * 2 + 1;
        }
      }
      cout << ans << endl;
    }
  }
  return 0;
}
