#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long dx[] = {-1, 0, 1, 0};
long long dy[] = {0, -1, 0, 1};
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long q;
  cin >> q;
  while (q--) {
    long long h, c, t;
    cin >> h >> c >> t;
    if (t == h) {
      cout << 1 << "\n";
      continue;
    } else if (t * 2.0 <= (h + c)) {
      cout << 2 << "\n";
      continue;
    }
    long long s = 0, e = 1e6, ans = 1;
    long double val = 1000000000;
    while (s != e) {
      long long mid = (s + e + 1) / 2;
      long long x = h * (mid + 1) + c * mid;
      long double p = x;
      p /= (2 * mid + 1);
      if (p <= t) {
        e = mid - 1;
      } else {
        s = mid;
      }
    }
    for (long long i = s; i < s + 3; i++) {
      long long x = h * (i + 1) + c * i;
      long double p = x;
      p /= (2 * i + 1);
      if (abs(p - t) < val) {
        val = abs(p - t);
        ans = i;
      }
    }
    cout << 2 * ans + 1 << "\n";
  }
}
