#include <bits/stdc++.h>
struct Drob {
  long long a, b;
  Drob(long long a = 0, long long b = 0) : a(a), b(b) { ; }
  bool operator<(const Drob& other) const {
    return (a * other.b) < (b * other.a);
  }
  Drob operator-(const Drob& other) const {
    return Drob(a * other.b - other.a * b, b * other.b);
  }
};
Drob ggg(Drob a, Drob b) { return (std::max(a, b) - std::min(a, b)); }
void solve() {
  signed cc, hh, tt;
  std::cin >> hh >> cc >> tt;
  long long c(cc), h(hh), t(tt);
  std::pair<Drob, signed> ans{Drob(1e9, 1), -1};
  auto get = [&](long long i) {
    return std::pair<Drob, signed>{
        ggg(Drob(c * (i / 2) + h * (i - (i / 2)), i), Drob(t, 1)), i};
  };
  auto get2 = [&](long long i) {
    return Drob(c * (i / 2) + h * (i - (i / 2)), i);
  };
  ans = std::min(get(1), ans);
  ans = std::min(get(2), ans);
  long long beg = 1, end = 1e8;
  while ((beg + 1) < end) {
    long long mid = (beg + end) / 2;
    if (get2(mid * 2 + 1) < Drob(t, 1)) {
      end = mid;
    } else {
      beg = mid;
    }
  }
  for (long long i = std::max(1ll, beg - 100); i < (end + 100); i++) {
    ans = std::min(ans, get(2 * i + 1));
  }
  std::cout << ans.second << '\n';
}
signed main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(0);
  std::cout.tie(0);
  signed t(1);
  std::cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
