#include <bits/stdc++.h>
using namespace std;
long long h, c, t;
double f(long long num) {
  long long tot = (2 * num - 1);
  long long val = ceil(tot / 2.) * h + (tot / 2) * c;
  double avg = ((double)val / tot);
  double ret = fabs(avg - (double)t);
  return ret;
}
void test_cases() {
  scanf("%lld%lld%lld", &h, &c, &t);
  double cur = fabs(t - (h + c) / 2.);
  long long lo = 0, hi = 1000000., ans = 0;
  while (hi - lo > 1) {
    long long mid = (lo + hi) >> 1;
    if (f(mid) > f(mid + 1))
      lo = mid;
    else
      hi = mid;
  }
  ans = 2 * (lo + 1) - 1;
  long long ret;
  double fans = f(ans);
  if (fans == cur) {
    if (ans < 2)
      ret = ans;
    else
      ret = 2;
  }
  if (fans < cur)
    ret = ans;
  else
    ret = 2;
  if (ret == 0) ret = 2;
  printf("%lld\n", ret);
}
int main() {
  int tc;
  scanf("%d", &tc);
  while (tc--) {
    test_cases();
  }
}
