#include <bits/stdc++.h>
using namespace std;
mt19937_64 mt(time(0));
long long gcd(long long a, long long b) {
  if (a > b) swap(a, b);
  if (a == 0) return b;
  return gcd(b % a, a);
}
pair<long long, long long> get_res(long long a, long long b, long long n,
                                   long long c) {
  long long x = (n + 1) * a + n * b;
  long long y = 2 * n + 1;
  x = abs(x - y * c);
  long long tmp = gcd(x, y);
  return {x / tmp, y / tmp};
}
bool my_less(pair<long long, long long> x, pair<long long, long long> y) {
  return x.first * y.second < y.first * x.second;
}
int solve(int a, int b, int c) {
  if (c >= a) return 1;
  if ((a + b) >= c * 2) return 2;
  int tmp = (a - c) / (2 * c - a - b);
  pair<long long, long long> res = get_res(a, b, tmp, c);
  int ret = tmp;
  if (tmp - 1 >= 0) {
    pair<long long, long long> res1 = get_res(a, b, tmp - 1, c);
    if (my_less(res1, res)) {
      res = res1;
      ret = tmp - 1;
    }
  }
  pair<long long, long long> res2 = get_res(a, b, tmp + 1, c);
  if (my_less(res2, res)) {
    ret = tmp + 1;
  }
  return 2 * ret + 1;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout.precision(10);
  cout << fixed;
  int t;
  cin >> t;
  while (t--) {
    int a, b, c;
    cin >> a >> b >> c;
    cout << solve(a, b, c) << '\n';
  }
  return 0;
}
