#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
template<typename T>
using ordered_set=tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;
#define ll long long
#define ull unsigned long long
#define pi pair<ll,ll>
#define pii pair<ll,pi>
#define inf 1000000000000000000
#define iinf -1000000000000000000
#define __ ios_base::sync_with_stdio(0);cin.tie();cout.tie();
#define mod 1000000007
#define base 1949313259
#define en '\n'
ll Set(ll N,ll pos){ return N=N | (1LL<<pos); }
ll reset(ll N,ll pos){ return N= N & ~(1LL<<pos); }
bool check(ll N,ll pos){ return (bool)(N & (1LL<<pos)); }
ll ar[]={0,0,1,-1};
ll br[]={1,-1,0,0};
ll bigmod(ll n,ll pow){
if(pow==0) return 1;
if(pow==1) return n%mod;
ll ans=bigmod(n,pow/2);
ans=(ans*ans)%mod;
if(pow%2==1){ans=(ans*n)%mod;}
return ans%mod;
}
ll fact[1000005];
ll nCr(ll n,ll r){
ll ans=fact[n];
ans=(ans*bigmod(fact[r],mod-2))%mod;
ans=(ans*bigmod(fact[n-r],mod-2))%mod;
return ans;
}
string s[200],s1,s2;
ll n,m;
ll arr[500010];
ll brr[500010];
vector<ll>v,v1;
map<ll,ll>mp;
ll vis[500005];
int main()
{__
ll i,j,z,a;
double b,c,d,e,f,h,g,x,y,t,k,l,r;
fact[0]=1;
// for(i=1;i<=1000000;i++) fact[i]=(fact[i-1]*i)%mod;
ll ans=0,sum=0,temp;
cin>>n;
for(ll cz=0;cz<n;cz++){
cin>>h>>c>>t;
if(abs(((h+c)/2.0)-t)<=0.00000001||(h+c)/2>t){cout<<2<<endl;continue;}
// cout<<(h+c)/2-c<<endl;
m=abs((ll)(h-t+c-t));
z=abs((ll)(t-h));
a=z/m;
a=max(0LL,a-1000);
double diff=1000000000000000;
for(i=0;i<=1005;i++,a++){
r=(a+1)*h+a*c;
r/=(double)(2.0*a+1.0);
if(abs(r-t)<di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gICAgIGE9ei9tOwogICAgICAgIGE9bWF4KDBMTCxhLTEwMDApOwogICAgICAgIGRvdWJsZSBkaWZmPTEwMDAwMDAwMDAwMDAwMDA7CgogICAgICAgIGZvcihpPTA7aTw9MTAwNTtpKyssYSsrKXsKICAgICAgICByPShhKzEpKmgrYSpjOwogICAgICAgIHIvPShkb3VibGUpKDIuMCphKzEuMCk7CiAgICAgICAgaWYoYWJzKHItdCk8ZGlmZil7YW5zPWE7ZGlmZj1hYnMoci10KTt9CiAgICAgICAgfQogICAgICAgIGNvdXQ8PGFucyoyKzE8PGVuZGw7CiAgICAgICAgfQp9