#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("unroll-loops")
using namespace std;
using namespace std;
inline long long int addmod(long long int a, long long int b) {
  return (a % 1000000007 + b % 1000000007) % 1000000007;
}
inline long long int submod(long long int a, long long int b) {
  return (a % 1000000007 - b % 1000000007) % 1000000007;
}
inline long long int mulmod(long long int a, long long int b) {
  return ((a % 1000000007) * (b % 1000000007)) % 1000000007;
}
bool isPrime(int n) {
  if (n == 1) return false;
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
vector<int> factors(int n) {
  vector<int> fact;
  for (int i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      fact.push_back(i);
      if (i * i != n) {
        fact.push_back(n / i);
      }
    }
  }
  return fact;
}
long long int pw(long long int a, long long int b) {
  long long int res = 1;
  while (b > 0) {
    if (b & 1) {
      res = (res * a);
    }
    b = b >> 1;
    a = (a * a);
  }
  return res;
}
long long int pwmod(long long int a, long long int b) {
  long long int res = 1;
  a = a % 1000000007;
  while (b > 0) {
    if (b & 1) {
      res = (res * a) % 1000000007;
    }
    b = b >> 1;
    a = (a * a) % 1000000007;
  }
  return res;
}
long long int modinv(long long int a) { return pwmod(a, 1000000007 - 2); }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int tt;
  cin >> tt;
  while (tt--) {
    int a, b, c;
    cin >> a >> b >> c;
    if (c >= a) {
      cout << 1 << '\n';
      continue;
    }
    if (c <= (a + b) / 2) {
      cout << 2 << '\n';
      continue;
    }
    long long int st = 1;
    long long int dr = (1LL << 40);
    long long int mini = 0;
    double te = 0;
    while (st <= dr) {
      long long int mid = (st + dr) / 2;
      long long int sum = 1LL * mid * a + 1LL * (mid - 1) * b;
      double avg = (0.0000 + sum) / (0.0000 + mid + mid - 1);
      if (avg >= c)
        mini = mid, st = mid + 1;
      else
        dr = mid - 1;
    }
    te = (a + b) / 2;
    long long int ans = 2;
    for (long long int mid = mini; mid <= mini + 100; mid++) {
      long long int sum = 1LL * mid * a + 1LL * (mid - 1) * b;
      double avg = (0.0000 + sum) / (0.0000 + mid + mid - 1);
      if (abs(avg - c) < abs(te - c)) {
        ans = mid + mid - 1;
        te = avg;
      }
    }
    cout << ans << '\n';
  }
  return 0;
}
