#include <bits/stdc++.h>
using namespace std;
void mycode();
const long long int mod = 998244353;
long long int ceil(long long int a, long long int b) { return (a + b - 1) / b; }
long long int min(long long int a, long long int b) {
  if (a > b)
    return b;
  else
    return a;
}
bool bit_check(long long int a, int i) {
  if ((a & ((long long)1 << (i - 1)))) return 1;
  return 0;
}
long long int bit_toggle(long long int a, int i) {
  return (a ^ ((long long)1 << (i - 1)));
}
long long int bit_sum(long long int a, int i) {
  return a + ((long long)1 << (i - 1));
}
long long int bit_sub(long long int a, int i) {
  return a - ((long long)1 << (i - 1));
}
long long int mod_power(long long int x, long long int y) {
  long long int p = mod;
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int power_of(long long int a, int b) {
  if (a == 0) return -1;
  return 1 + power_of(a / b, b);
}
long long int power(long long int a, int b) {
  long long int c = 1;
  if (b > 0)
    while (b--) c = c * a;
  return c;
}
double T, c, h;
double fx(long long int x) {
  if (x & 1) {
  } else
    return 999999999;
  double xx = (x - 1.0) / 2.0;
  return abs(T - (h + c * xx + h * xx) / (2.0 * xx + 1.0));
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  mycode();
  return 0;
}
void mycode() {
  int t, f = 0;
  cin >> t;
  bool flag = 0;
  while (t--) {
    f++;
    cin >> h >> c >> T;
    double value = (1LL << 60) + 5;
    long long int mi, k = 30;
    long long int left = 1, right = (1LL << 31), shift = (1LL << 30);
  upside:
    for (long long int i = left; i <= right; i += shift) {
      if (value > fx(i)) {
        mi = i;
        value = fx(i);
      } else if (i < mi && value + 0.0000001 > fx(i)) {
        mi = i;
        value = fx(i);
      }
    }
    if (shift != 1) {
      left = max(mi - shift, left);
      right = min(mi + shift, right);
      shift = (1LL << k);
      k--;
      goto upside;
    }
    if (abs(T - (h + c + 0.0) / 2.0) < value) {
      mi = 2;
    }
    cout << mi << '\n';
  }
}
