#include <bits/stdc++.h>
using namespace std;
long long power(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long double l, h, t;
long double fu(long long a) {
  long double x1 = a / 2 + a % 2;
  long double y1 = a / 2;
  long double ans1 = (x1 * h + y1 * l) / (long double)a;
  return ans1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int T;
  cin >> T;
  while (T--) {
    cin >> h >> l >> t;
    long double temp = (l + h) / 2.0;
    temp = 2 * (t - temp);
    long long count = (h - l) / temp;
    long double ans = 2, min1 = abs(t - (l + h) / 2);
    for (int i = count - 15; i <= count + 15; i++) {
      if (i > 0) {
        long double p = fu(i);
        if (abs(t - p) < min1) {
          min1 = abs(t - p);
          ans = i;
        }
      }
    }
    cout << ans << endl;
  }
}
