#include <bits/stdc++.h>
using namespace std;
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long int i, j, t, n, k, l, d, r, p, m, x, y;
  cin >> t;
  while (t--) {
    cin >> n >> m >> k;
    if (k <= (n + m) / 2) {
      cout << 2 << "\n";
    } else {
      double n1 = n, m1 = m, k1 = k;
      long long int ans = (n1 - k1) / ((2 * k1) - n1 - m1);
      long long int ans1 = 2 * ans + 1;
      long long int ans2 = ans1 + 2;
      if ((n1 - m1) * (ans1 + ans2) <= ((2 * k1) - n1 - m1) * (ans1)*ans2 * 2) {
        cout << ans1 << "\n";
      } else {
        cout << ans2 << "\n";
      }
    }
  }
}
