#include <bits/stdc++.h>
using namespace std;
long long int n, T, x, y, z;
int main() {
  ios::sync_with_stdio(false);
  cin >> T;
  while (T--) {
    cin >> x >> y >> z;
    if (x <= z)
      cout << 1 << endl;
    else if ((float)(x + y) / 2 >= z)
      cout << 2 << endl;
    else {
      long long int lb = 1, rb = 1000000000, m, X;
      while (lb < rb) {
        m = (lb + rb - 1) / 2;
        if (z >= (float)(m * (x + y) + x) / (2 * m + 1))
          rb = m;
        else
          lb = m + 1;
      }
      X = 2 * rb + 1;
      float Y = ((float)rb * (x + y) + x) / (2 * rb + 1);
      lb = 0, rb = 1000000000;
      while (lb < rb) {
        m = (lb + rb + 1) / 2;
        if (z <= (float)(m * (x + y) + x) / (2 * m + 1))
          lb = m;
        else
          rb = m - 1;
      }
      if (fabs((float)z - Y) <
          fabs((float)z - (float)(rb * (x + y) + x) / (2 * rb + 1)))
        cout << X << endl;
      else
        cout << 2 * rb + 1 << endl;
    }
  }
}
