#include <bits/stdc++.h>
using namespace std;
int main() {
  int T;
  long long h, c, t, lo, hi, mid, l;
  scanf("%d", &T);
  for (int tc = 0; tc < T; tc++) {
    scanf("%lld%lld%lld", &h, &c, &t);
    if ((t << 1) <= h + c)
      printf("2\n");
    else {
      lo = 0;
      hi = 500005;
      while ((hi - lo) > 1) {
        mid = (lo + hi) >> 1;
        if ((mid + 1) * h + mid * c <= t * ((mid << 1) + 1))
          hi = mid;
        else
          lo = mid;
      }
      l = lo;
      if ((2 * l + 3) * (l * h + l * c + h) +
              (2 * l + 1) * (l * h + l * c + 2 * h + c) <=
          2 * t * (2 * l + 1) * (2 * l + 3))
        printf("%lld\n", (lo << 1) + 1);
      else
        printf("%lld\n", (lo << 1) + 3);
    }
  }
  return 0;
}
