#include <bits/stdc++.h>
using namespace std;
int main() {
  int cs;
  cin >> cs;
  while (cs--) {
    double h, c, t;
    cin >> h >> c >> t;
    if (t >= h)
      cout << 1 << endl;
    else if (t <= (c + h) / 2)
      cout << 2 << endl;
    else {
      long long l = 1, r = 1e9, val;
      while (l < r) {
        long long mid = (l + r) / 2;
        val = 2 * mid + 1;
        double avg = (double)((val + 1) / 2) * h + (double)(val / 2) * c;
        avg /= val;
        if (avg < t)
          r = mid - 1;
        else
          l = mid + 1;
      }
      double mn = 1e9;
      int ans = val;
      for (int i = max(1LL, val - 100); i < val + 100; i += 2) {
        double avg = (double)((i + 1) / 2) * h + (double)(i / 2) * c;
        avg /= i;
        avg = fabs(avg - t);
        if (avg < mn) {
          mn = avg;
          ans = i;
        }
      }
      cout << ans << endl;
    }
  }
}
