#include <bits/stdc++.h>
using namespace std;
int in(char &c) { return scanf("%c", &c); }
int in(char s[]) { return scanf("%s", s); }
int in(int &x) { return scanf("%d", &x); }
int in(long long &x) { return scanf("%lld", &x); }
int in(double &x) { return scanf("%lf", &x); }
int in(pair<int, int> &p) { return scanf("%d%d", &p.first, &p.second); }
int in(pair<long long, long long> &p) {
  return scanf("%lld%lld", &p.first, &p.second);
}
int in(pair<double, double> &p) { return scanf("%lf%lf", &p.first, &p.second); }
int in(long double &a) { return scanf("%Lf", &a); }
int in(int &x, long long &y) { return scanf("%d%lld", &x, &y); }
int in(long long &x, int &y) { return scanf("%lld%d", &x, &y); }
int in(int &x, int &y) { return scanf("%d%d", &x, &y); }
int in(long long &x, long long &y) { return scanf("%lld%lld", &x, &y); }
int in(int &n, char s[]) { return scanf("%d%d", &n, s); }
int in(char a[], char b[]) { return scanf("%s%s", a, b); }
int in(double &x, double &y) { return scanf("%lf%lf", &x, &y); }
int in(int &x, int &y, int &z) { return scanf("%d%d%d", &x, &y, &z); }
int in(long long &x, long long &y, long long &z) {
  return scanf("%lld%lld%lld", &x, &y, &z);
}
int in(double &x, double &y, double &z) {
  return scanf("%lf%lf%lf", &x, &y, &z);
}
int in(int &x, int &y, int &z, int &k) {
  return scanf("%d%d%d%d", &x, &y, &z, &k);
}
int in(long long &x, long long &y, long long &z, long long &k) {
  return scanf("%lld%lld%lld%lld", &x, &y, &z, &k);
}
int in(double &x, double &y, double &z, double &k) {
  return scanf("%lf%lf%lf%lf", &x, &y, &z, &k);
}
const int N = 3e5 + 10, M = 1e3 + 10, mod = 1e9 + 7;
const double eps = 1e-6, Pi = acos(-1.0);
double cost(long long x, long long h, long long c) {
  if (x <= 0) return 1e18;
  return 1.0 * (h * x + (x - 1) * c) / (2 * x - 1);
}
int main() {
  int T;
  in(T);
  while (T--) {
    long long h, c, t;
    in(h, c, t);
    if (h + c == t * 2 || c >= t || h + c >= 2 * t)
      printf("2\n");
    else {
      double a = c - t;
      double b = h + c - 2 * t;
      long long x = a / b;
      double s[3];
      s[0] = fabs(t - cost(x - 1, h, c));
      s[1] = fabs(t - cost(x, h, c));
      s[2] = fabs(t - cost(x + 1, h, c));
      long long ans = x - 1;
      if (s[0] <= s[1] && s[0] <= s[2])
        ans = x - 1;
      else if (s[1] <= s[0] && s[1] <= s[2])
        ans = x;
      else if (s[2] <= s[0] && s[2] <= s[1])
        ans = x + 1;
      printf("%lld\n", ans * 2 - 1);
    }
  }
  return 0;
}
