using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using EducationalCodeforcesRound088Div2.Extensions;
using EducationalCodeforcesRound088Div2.Questions;

namespace EducationalCodeforcesRound088Div2.Questions
{
    public class QuestionC : AtCoderQuestionBase
    {
        public override IEnumerable<object> Solve(TextReader inputStream)
        {
            var tests = inputStream.ReadInt();
            for (int t = 0; t < tests; t++)
            {
                var (hotTemp, coldTemp, targetTemp) = inputStream.ReadValue<long, long, long>();

                if (targetTemp >= hotTemp)
                {
                    yield return 1;
                }
                else if (targetTemp * 2 <= (hotTemp + coldTemp))
                {
                    yield return 2;
                }
                else
                {
                    long times = (hotTemp - targetTemp) / (2 * targetTemp - hotTemp - coldTemp);
                    var lastTemp = new Fraction(hotTemp * (times + 1) + coldTemp * times, 2 * times + 1);
                    times += 1;
                    var temp = new Fraction(hotTemp * (times + 1) + coldTemp * times, 2 * times + 1);
                    var lastTempTuubun = lastTemp.Numerator * temp.Denominator;
                    var tempTuubun = temp.Numerator * lastTemp.Denominator;
                    var targetTempTuubun = targetTemp * lastTemp.Denominator * temp.Denominator;
                    if (Math.Abs(lastTempTuubun - targetTempTuubun) <= Math.Abs(tempTuubun - targetTempTuubun))
                    {
                        yield return 2 * times - 1;
                    }
                    else
                    {
                        yield return 2 * times + 1;
                    }
                }
            }
        }

        public struct Fraction : IEquatable<Fraction>, IComparable<Fraction>
        {
            /// 分子
            public long Numerator { get; }
            /// 分母
            public long Denominator { get; }

            public static Fraction Nan => new Fraction(0, 0);
            public static Fraction PositiveInfinity => new Fraction(1, 0);
            public static Fraction NegativeInfinity => new Fraction(-1, 0);
            public bool IsNan => Numerator == 0 && Denominator == 0;
            public bool IsInfinity => Numerator != 0 && Denominator == 0;
            public bool IsPositiveInfinity => Numerator > 0 && Denominator == 0;
            public bool IsNegativeInfinity => Numerator < 0 && Denominator == 0;

            ///
            /// <c>Fraction</c>クラスの新しいインスタンスを生成します。
            ///
            /// <param name="numerator">分子</param>
            /// <param name="denominator">分母</param>
            public Fraction(long numerator, long denominator)
            {
                if (denominator == 0)
                {
                    Numerator = Math.Sign(numerator);
                    Denominator = 0;
                }
                else if (numerator == 0)
                {
                    Numerator = 0;
                    Denominator = 1;
                }
                else
                {
                    var sign = Math.Sign(numerator) * Math.Sign(denominator);
                    numerator = Math.Abs(numerator);
                    denominator = Math.Abs(denominator);
                    var gcd = Gcd(numerator, denominator);
                    Numerator = sign * numerator / gcd;
                    Denominator = denominator / gcd;
                }
            }

            public static Fraction operator +(Fraction left, Fraction right)
            {
                if (left.IsNan || right.IsNan)
                {
                    return Nan;
                }
                else if (left.IsInfinity || right.IsInfinity)
                {
                    if (!right.IsInfinity)
                    {
                        return left;
                    }
                    else if (!left.IsInfinity)
                    {
                        return right;
                    }
                    else
                    {
                        return new Fraction(left.Numerator + right.Numerator, 0);
                    }
                }
                else
                {
                    var lcm = Lcm(left.Denominator, right.Denominator);
                    return new Fraction(left.Numerator * (lcm / left.Denominator) + right.Numerator * (lcm / right.Denominator), lcm);
                }
            }
            public static Fraction operator -(Fraction left, Fraction right) => left + -right;
            public static Fraction operator *(Fraction left, Fraction right) => new Fraction(left.Numerator * right.Numerator, left.Denominator * right.Denominator);
            public static Fraction operator /(Fraction left, Fraction right) => new Fraction(left.Numerator * right.Denominator, left.Denominator * right.Numerator);
            public static Fraction operator +(Fraction right) => right;
            public static Fraction operator -(Fraction right) => new Fraction(-right.Numerator, right.Denominator);
            public static bool operator ==(Fraction left, Fraction right) => left.Equals(right);
            public static bool operator !=(Fraction left, Fraction right) => !(left == right);
            public static implicit operator double(Fraction right)
            {
                if (right.IsNan)
                {
                    return double.NaN;
                }
                else if (right.IsPositiveInfinity)
                {
                    return double.PositiveInfinity;
                }
                else if (right.IsNegativeInfinity)
                {
                    return double.NegativeInfinity;
                }
                else
                {
                    return (double)right.Numerator / right.Denominator;
                }
            }

            public override string ToString()
            {
                if (IsNan)
                {
                    return "NaN";
                }
                else if (IsPositiveInfinity)
                {
                    return "Inf";
                }
                else if (IsNegativeInfinity)
                {
                    return "-Inf";
                }
                else
                {
                    return $"{Numerator}/{Denominator} = {(double)Numerator/Denominator:0.00}";
                }
            }

            public override bool Equals(object obj) => obj is Fraction fraction && Equals(fraction);
            public bool Equals(Fraction other) => Numerator == other.Numerator && Denominator == other.Denominator;
            public int CompareTo(Fraction other) => ((double)this).CompareTo(other);

            static long Gcd(long a, long b)
            {
                if (a <= 0)
                {
                    throw new ArgumentOutOfRangeException(nameof(a), $"{nameof(b)}は正の整数である必要があります。");
                }
                if (b <= 0)
                {
                    throw new ArgumentOutOfRangeException(nameof(b), $"{nameof(b)}は正の整数である必要があります。");
                }
                if (a < b)
                {
                    (a, b) = (b, a);
                }

                while (b != 0)
                {
                    (a, b) = (b, a % b);
                }
                return a;
            }

            static long Lcm(long a, long b)
            {
                if (a <= 0)
                {
                    throw new ArgumentOutOfRangeException(nameof(a), $"{nameof(b)}は正の整数である必要があります。");
                }
                if (b <= 0)
                {
                    throw new ArgumentOutOfRangeException(nameof(b), $"{nameof(b)}は正の整数である必要があります。");
                }

                return a / Gcd(a, b) * b;
            }

        }

    }
}

namespace EducationalCodeforcesRound088Div2
{
    class Program
    {
        static void Main(string[] args)
        {
            IAtCoderQuestion question = new QuestionC();
            var answers = question.Solve(Console.In);

            var writer = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
            Console.SetOut(writer);
            foreach (var answer in answers)
            {
                Console.WriteLine(answer);
            }
            Console.Out.Flush();
        }
    }
}

#region Base Class

namespace EducationalCodeforcesRound088Div2.Questions
{

    public interface IAtCoderQuestion
    {
        IEnumerable<object> Solve(string input);
        IEnumerable<object> Solve(TextReader inputStream);
    }

    public abstract class AtCoderQuestionBase : IAtCoderQuestion
    {
        public IEnumerable<object> Solve(string input)
        {
            var stream = new MemoryStream(Encoding.Unicode.GetBytes(input));
            var reader = new StreamReader(stream, Encoding.Unicode);

            return Solve(reader);
        }

        public abstract IEnumerable<object> Solve(TextReader inputStream);
    }
}

#endregion

#region Extensions

namespace EducationalCodeforcesRound088Div2.Extensions
{
    internal static class TextReaderExtensions
    {
        internal static int ReadInt(this TextReader reader) => int.Parse(ReadString(reader));
        internal static long ReadLong(this TextReader reader) => long.Parse(ReadString(reader));
        internal static double ReadDouble(this TextReader reader) => double.Parse(ReadString(reader));
        internal static string ReadString(this TextReader reader) => reader.ReadLine();

        internal static int[] ReadIntArray(this TextReader reader, char separator = ' ') => ReadStringArray(reader, separator).Select(int.Parse).ToArray();
        internal static long[] ReadLongArray(this TextReader reader, char separator = ' ') => ReadStringArray(reader, separator).Select(long.Parse).ToArray();
        internal static double[] ReadDoubleArray(this TextReader reader, char separator = ' ') => ReadStringArray(reader, separator).Select(double.Parse).ToArray();
        internal static string[] ReadStringArray(this TextReader reader, char separator = ' ') => reader.ReadLine().Split(separator);

        // Supports primitive type only.
        internal static T1 ReadValue<T1>(this TextReader reader) => (T1)Convert.ChangeType(reader.ReadLine(), typeof(T1));

        internal static (T1, T2) ReadValue<T1, T2>(this TextReader reader, char separator = ' ')
        {
            var inputs = ReadStringArray(reader, separator);
            var v1 = (T1)Convert.ChangeType(inputs[0], typeof(T1));
            var v2 = (T2)Convert.ChangeType(inputs[1], typeof(T2));
            return (v1, v2);
        }

        internal static (T1, T2, T3) ReadValue<T1, T2, T3>(this TextReader reader, char separator = ' ')
        {
            var inputs = ReadStringArray(reader, separator);
            var v1 = (T1)Convert.ChangeType(inputs[0], typeof(T1));
            var v2 = (T2)Convert.ChangeType(inputs[1], typeof(T2));
            var v3 = (T3)Convert.ChangeType(inputs[2], typeof(T3));
            return (v1, v2, v3);
        }

        internal static (T1, T2, T3, T4) ReadValue<T1, T2, T3, T4>(this TextReader reader, char separator = ' ')
        {
            var inputs = ReadStringArray(reader, separator);
            var v1 = (T1)Convert.ChangeType(inputs[0], typeof(T1));
            var v2 = (T2)Convert.ChangeType(inputs[1], typeof(T2));
            var v3 = (T3)Convert.ChangeType(inputs[2], typeof(T3));
            var v4 = (T4)Convert.ChangeType(inputs[3], typeof(T4));
            return (v1, v2, v3, v4);
        }

        internal static (T1, T2, T3, T4, T5) ReadValue<T1, T2, T3, T4, T5>(this TextReader reader, char separator = ' ')
        {
            var inputs = ReadStringArray(reader, separator);
            var v1 = (T1)Convert.ChangeType(inputs[0], typeof(T1));
            var v2 = (T2)Convert.ChangeType(inputs[1], typeof(T2));
            var v3 = (T3)Convert.ChangeType(inputs[2], typeof(T3));
            var v4 = (T4)Convert.ChangeType(inputs[3], typeof(T4));
            var v5 = (T5)Convert.ChangeType(inputs[4], typeof(T5));
            return (v1, v2, v3, v4, v5);
        }

        internal static (T1, T2, T3, T4, T5, T6) ReadValue<T1, T2, T3, T4, T5, T6>(this TextReader reader, char separator = ' ')
        {
            var inputs = ReadStringArray(reader, separator);
            var v1 = (T1)Convert.ChangeType(inputs[0], typeof(T1));
            var v2 = (T2)Convert.ChangeType(inputs[1], typeof(T2));
            var v3 = (T3)Convert.ChangeType(inputs[2], typeof(T3));
            var v4 = (T4)Convert.ChangeType(inputs[3], typeof(T4));
            var v5 = (T5)Convert.ChangeType(inputs[4], typeof(T5));
            var v6 = (T6)Convert.ChangeType(inputs[5], typeof(T6));
            return (v1, v2, v3, v4, v5, v6);
        }

        internal static (T1, T2, T3, T4, T5, T6, T7) ReadValue<T1, T2, T3, T4, T5, T6, T7>(this TextReader reader, char separator = ' ')
        {
            var inputs = ReadStringArray(reader, separator);
            var v1 = (T1)Convert.ChangeType(inputs[0], typeof(T1));
            var v2 = (T2)Convert.ChangeType(inputs[1], typeof(T2));
            var v3 = (T3)Convert.ChangeType(inputs[2], typeof(T3));
            var v4 = (T4)Convert.ChangeType(inputs[3], typeof(T4));
            var v5 = (T5)Convert.ChangeType(inputs[4], typeof(T5));
            var v6 = (T6)Convert.ChangeType(inputs[5], typeof(T6));
            var v7 = (T7)Convert.ChangeType(inputs[6], typeof(T7));
            return (v1, v2, v3, v4, v5, v6, v7);
        }
    }
}

#endregion


using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using EducationalCodeforcesRound088Div2.Extensions;
using EducationalCodeforcesRound088Div2.Questions;

namespace EducationalCodeforcesRound088Div2.Questions
{
    public class QuestionC : AtCoderQuestionBase
    {
        public override IEnumerable<object> Solve(TextReader inputStream)
        {
            var tests = inputStream.ReadInt();
            for (int t = 0; t < tests; t++)
            {
                var (hotTemp, coldTemp, targetTemp) = inputStream.ReadValue<int, int, int>();

                if (targetTemp == hotTemp)
                {
                    yield return 1;
                }
                else if (targetTemp * 2 <= (hotTemp + coldTemp))
                {
                    yield return 2;
                }
                else
                {
                    var lastTemp = new Fraction(hotTemp, 1);
                    var times = 1;
                    while (true)
                    {
                        times += 1;
                        var temp = new Fraction(hotTemp * times + coldTemp * (times - 1), 2 * times - 1);
                        if (temp.Numerator <= targetTemp * temp.Denominator)
                        {
                            var lastTempTuubun = lastTemp.Numerator * temp.Denominator;
                            var tempTuubun = temp.Numerator * lastTemp.Denominator;
                            var targetTempTuubun = targetTemp * lastTemp.Denominator * temp.Denominator;
                            if (Math.Abs(lastTempTuubun - targetTempTuubun) <= Math.Abs(tempTuubun - targetTempTuubun))
                            {
                                yield return 2 * times - 3;
                            }
                            else
                            {
                                yield return 2 * times - 1;
                            }
                            break;
                        }
                        else
                        {
                            lastTemp = temp;
                        }
                    }
                }
            }
        }

        public struct Fraction : IEquatable<Fraction>, IComparable<Fraction>
        {
            /// 分子
            public long Numerator { get; }
            /// 分母
            public long Denominator { get; }

            public static Fraction Nan => new Fraction(0, 0);
            public static Fraction PositiveInfinity => new Fraction(1, 0);
            public static Fraction NegativeInfinity => new Fraction(-1, 0);
            public bool IsNan => Numerator == 0 && Denominator == 0;
            public bool IsInfinity => Numerator != 0 && Denominator == 0;
            public bool IsPositiveInfinity => Numerator > 0 && Denominator == 0;
            public bool IsNegativeInfinity => Numerator < 0 && Denominator == 0;

            ///
            /// <c>Fraction</c>クラスの新しいインスタンスを生成します。
            ///
            /// <param name="numerator">分子</param>
            /// <param name="denominator">分母</param>
            public Fraction(long numerator, long denominator)
            {
                if (denominator == 0)
                {
                    Numerator = Math.Sign(numerator);
                    Denominator = 0;
                }
                else if (numerator == 0)
                {
                    Numerator = 0;
                    Denominator = 1;
                }
                else
                {
                    var sign = Math.Sign(numerator) * Math.Sign(denominator);
                    numerator = Math.Abs(numerator);
                    denominator = Math.Abs(denominator);
                    var gcd = Gcd(numerator, denominator);
                    Numerator = sign * numerator / gcd;
                    Denominator = denominator / gcd;
                }
            }

            public static Fraction operator +(in Fraction left, in Fraction right)
            {
                if (left.IsNan || right.IsNan)
                {
                    return Nan;
                }
                else if (left.IsInfinity || right.IsInfinity)
                {
                    if (!right.IsInfinity)
                    {
                        return left;
                    }
                    else if (!left.IsInfinity)
                    {
                        return right;
                    }
                    else
                    {
                        return new Fraction(left.Numerator + right.Numerator, 0);
                    }
                }
                else
                {
                    var lcm = Lcm(left.Denominator, right.Denominator);
                    return new Fraction(left.Numerator * (lcm / left.Denominator) + right.Numerator * (lcm / right.Denominator), lcm);
                }
            }
            public static Fraction operator -(in Fraction left, in Fraction right) => left + -right;
            public static Fraction operator *(in Fraction left, in Fraction right) => new Fraction(left.Numerator * right.Numerator, left.Denominator * right.Denominator);
            public static Fraction operator /(in Fraction left, in Fraction right) => new Fraction(left.Numerator * right.Denominator, left.Denominator * right.Numerator);
            public static Fraction operator +(in Fraction right) => right;
            public static Fraction operator -(in Fraction right) => new Fraction(-right.Numerator, right.Denominator);
            public static bool operator ==(in Fraction left, in Fraction right) => left.Equals(right);
            public static bool operator !=(in Fraction left, in Fraction right) => !(left == right);
            public static implicit operator double(in Fraction right)
            {
                if (right.IsNan)
                {
                    return double.NaN;
                }
                else if (right.IsPositiveInfinity)
                {
                    return double.PositiveInfinity;
                }
                else if (right.IsNegativeInfinity)
                {
                    return double.NegativeInfinity;
                }
                else
                {
                    return (double)right.Numerator / right.Denominator;
                }
            }

            public override string ToString()
            {
                if (IsNan)
                {
                    return "NaN";
                }
                else if (IsPositiveInfinity)
                {
                    return "Inf";
                }
                else if (IsNegativeInfinity)
                {
                    return "-Inf";
                }
                else
                {
                    return $"{Numerator}/{Denominator}";
                }
            }

            public override bool Equals(object obj) => obj is Fraction fraction && Equals(fraction);
            public bool Equals(Fraction other) => Numerator == other.Numerator && Denominator == other.Denominator;
            public override int GetHashCode() => HashCode.Combine(Numerator, Denominator);
            public int CompareTo([System.Diagnostics.CodeAnalysis.AllowNull] Fraction other) => ((double)this).CompareTo(other);

            static long Gcd(long a, long b)
            {
                if (a <= 0)
                {
                    throw new ArgumentOutOfRangeException(nameof(a), $"{nameof(b)}は正の整数である必要があります。");
                }
                if (b <= 0)
                {
                    throw new ArgumentOutOfRangeException(nameof(b), $"{nameof(b)}は正の整数である必要があります。");
                }
                if (a < b)
                {
                    (a, b) = (b, a);
                }

                while (b != 0)
                {
                    (a, b) = (b, a % b);
                }
                return a;
            }

            static long Lcm(long a, long b)
            {
                if (a <= 0)
                {
                    throw new ArgumentOutOfRangeException(nameof(a), $"{nameof(b)}は正の整数である必要があります。");
                }
                if (b <= 0)
                {
                    throw new ArgumentOutOfRangeException(nameof(b), $"{nameof(b)}は正の整数である必要があります。");
                }

                return a / Gcd(a, b) * b;
            }

        }

    }
}

namespace EducationalCodeforcesRound088Div2
{
    class Program
    {
        static void Main(string[] args)
        {
            IAtCoderQuestion question = new QuestionC();
            var answers = question.Solve(Console.In);

            var writer = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
            Console.SetOut(writer);
            foreach (var answer in answers)
            {
                Console.WriteLine(answer);
            }
            Console.Out.Flush();
        }
    }
}

#region Base Class

namespace EducationalCodeforcesRound088Div2.Questions
{

    public interface IAtCoderQuestion
    {
        IEnumerable<object> Solve(string input);
        IEnumerable<object> Solve(TextReader inputStream);
    }

    public abstract class AtCoderQuestionBase : IAtCoderQuestion
    {
        public IEnumerable<object> Solve(string input)
        {
            var stream = new MemoryStream(Encoding.Unicode.GetBytes(input));
            var reader = new StreamReader(stream, Encoding.Unicode);

            return Solve(reader);
        }

        public abstract IEnumerable<object> Solve(TextReader inputStream);
    }
}

#endregion

#region Extensions

namespace EducationalCodeforcesRound088Div2.Extensions
{
    internal static class TextReaderExtensions
    {
        internal static int ReadInt(this TextReader reader) => int.Parse(ReadString(reader));
        internal static long ReadLong(this TextReader reader) => long.Parse(ReadString(reader));
        internal static double ReadDouble(this TextReader reader) => double.Parse(ReadString(reader));
        internal static string ReadString(this TextReader reader) => reader.ReadLine();

        internal static int[] ReadIntArray(this TextReader reader, char separator = ' ') => ReadStringArray(reader, separator).Select(int.Parse).ToArray();
        internal static long[] ReadLongArray(this TextReader reader, char separator = ' ') => ReadStringArray(reader, separator).Select(long.Parse).ToArray();
        internal static double[] ReadDoubleArray(this TextReader reader, char separator = ' ') => ReadStringArray(reader, separator).Select(double.Parse).ToArray();
        internal static string[] ReadStringArray(this TextReader reader, char separator = ' ') => reader.ReadLine().Split(separator);

        // Supports primitive type only.
        internal static T1 ReadValue<T1>(this TextReader reader) => (T1)Convert.ChangeType(reader.ReadLine(), typeof(T1));

        internal static (T1, T2) ReadValue<T1, T2>(this TextReader reader, char separator = ' ')
        {
            var inputs = ReadStringArray(reader, separator);
            var v1 = (T1)Convert.ChangeType(inputs[0], typeof(T1));
            var v2 = (T2)Convert.ChangeType(inputs[1], typeof(T2));
            return (v1, v2);
        }

        internal static (T1, T2, T3) ReadValue<T1, T2, T3>(this TextReader reader, char separator = ' ')
        {
            var inputs = ReadStringArray(reader, separator);
            var v1 = (T1)Convert.ChangeType(inputs[0], typeof(T1));
            var v2 = (T2)Convert.ChangeType(inputs[1], typeof(T2));
            var v3 = (T3)Convert.ChangeType(inputs[2], typeof(T3));
            return (v1, v2, v3);
        }

        internal static (T1, T2, T3, T4) ReadValue<T1, T2, T3, T4>(this TextReader reader, char separator = ' ')
        {
            var inputs = ReadStringArray(reader, separator);
            var v1 = (T1)Convert.ChangeType(inputs[0], typeof(T1));
            var v2 = (T2)Convert.ChangeType(inputs[1], typeof(T2));
            var v3 = (T3)Convert.ChangeType(inputs[2], typeof(T3));
            var v4 = (T4)Convert.ChangeType(inputs[3], typeof(T4));
            return (v1, v2, v3, v4);
        }

        internal static (T1, T2, T3, T4, T5) ReadValue<T1, T2, T3, T4, T5>(this TextReader reader, char separator = ' ')
        {
            var inputs = ReadStringArray(reader, separator);
            var v1 = (T1)Convert.ChangeType(inputs[0], typeof(T1));
            var v2 = (T2)Convert.ChangeType(inputs[1], typeof(T2));
            var v3 = (T3)Convert.ChangeType(inputs[2], typeof(T3));
            var v4 = (T4)Convert.ChangeType(inputs[3], typeof(T4));
            var v5 = (T5)Convert.ChangeType(inputs[4], typeof(T5));
            return (v1, v2, v3, v4, v5);
        }

        internal static (T1, T2, T3, T4, T5, T6) ReadValue<T1, T2, T3, T4, T5, T6>(this TextReader reader, char separator = ' ')
        {
            var inputs = ReadStringArray(reader, separator);
            var v1 = (T1)Convert.ChangeType(inputs[0], typeof(T1));
            var v2 = (T2)Convert.ChangeType(inputs[1], typeof(T2));
            var v3 = (T3)Convert.ChangeType(inputs[2], typeof(T3));
            var v4 = (T4)Convert.ChangeType(inputs[3], typeof(T4));
            var v5 = (T5)Convert.ChangeType(inputs[4], typeof(T5));
            var v6 = (T6)Convert.ChangeType(inputs[5], typeof(T6));
            return (v1, v2, v3, v4, v5, v6);
        }

        internal static (T1, T2, T3, T4, T5, T6, T7) ReadValue<T1, T2, T3, T4, T5, T6, T7>(this TextReader reader, char separator = ' ')
        {
            var inputs = ReadStringArray(reader, separator);
            var v1 = (T1)Convert.ChangeType(inputs[0], typeof(T1));
            var v2 = (T2)Convert.ChangeType(inputs[1], typeof(T2));
            var v3 = (T3)Convert.ChangeType(inputs[2], typeof(T3));
            var v4 = (T4)Convert.ChangeType(inputs[3], typeof(T4));
            var v5 = (T5)Convert.ChangeType(inputs[4], typeof(T5));
            var v6 = (T6)Convert.ChangeType(inputs[5], typeof(T6));
            var v7 = (T7)Convert.ChangeType(inputs[6], typeof(T7));
            return (v1, v2, v3, v4, v5, v6, v7);
        }
    }
}

#endregion


using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;

namespace ContestTemplateStartUp
{
    class ProgramA_
    {

        static void Main(string[] args)
        {
            var results = new List<long>();
            foreach (var test in Enumerable.Range(0, GetIntFromReadLine()))
            {
                var nx = Console.ReadLine().Split().Select(int.Parse).ToArray();
                var h = nx[0];
                var c = nx[1];
                var tar = nx[2];
                var tar2 = 2 * tar;
                if (tar2 <= (h + c)) { results.Add(2); }
                else
                {
                    //double kf = (tar - c) / (2.0 * tar - h - c);
                    //int fl =  (int)Math.Floor(kf);
                    long fl = lower_bound(h, c, tar);
                    var vars = new[] { fl - 1, fl }
                        .Where(x => x >= 1)
                        .OrderBy(x => x)
                        .ToArray();

                    var min = double.MaxValue;
                    var resK = -1L;
                    foreach (var k in vars)
                    {
                        var v = Math.Abs(((k * h + (k - 1) * c) - tar*(2*k-1)) / (2.0 * k - 1));
                        if (v < min)
                        {
                            min = v;
                            resK = k;
                        }
                    }
                    results.Add(2*resK-1);
                }
            }

            foreach (var result in results)
            {
                Console.WriteLine(result);
            }
        }

        static long lower_bound(int h, int c, int t)
        {
            long l = 1;
            long r = int.MaxValue;
            while (l + 1 < r)
            {
                long mid = (r + l) / 2;
                if (mid*h+(mid-1)*c >= t*(2*mid-1))
                {
                    l = mid;
                }
                else
                {
                    r = mid;
                }
            }
            return r;
        }

        private static int[] GetPrimes(int n)
        {
            var list = new List<int>();
            while (true)
            {
                var del = GetMinDel(n);
                if (del == 1)
                {
                    break;
                }
                list.Add(del);
                n = n / del;
            }
            return list.ToArray();
        }

        private static int GetMinDel(int n)
        {
            for (long index = 2; index * index <= n; ++index)
            {
                if (n % index == 0)
                {
                    return (int)index;
                }
            }
            return n;
        }

        public static bool Success(int[] chet, int[] nechet)
        {
            foreach (var ch in chet)
                foreach (var nch in nechet)
                {
                    if (Math.Abs(ch - nch) == 1)
                    {
                        return true;
                    }
                }
            return false;
        }

        static int GetInt()
        {
            int integer = 0;
            int n = Console.Read();
            while (n == ' ' || n == '\n' || n == '\r' || n == '\t' || n == -1)
                n = Console.Read();
            while (n >= '0' && n <= '9')
            {
                integer = integer * 10 + n - '0';
                n = Console.Read();
            }
            return integer;
        }
        static int[] ReadArray(int count)
        {
            int[] arr = new int[count];
            for (var index = 0; index < count; ++index)
            {
                arr[index] = GetInt();
            }
            return arr;

        }

        static int[] ReadArrayFromReadLine()
        {
            return Console.ReadLine().Split().Select(int.Parse).ToArray();
        }

        static int GetIntFromReadLine()
        {
            return int.Parse(Console.ReadLine());
        }

        public static int GetPower_(int num, int power)
        {
            if (power == 0) return 1;
            if (power == 1) return num;
            var prev = GetPower_(num, power / 2);
            var prev2 = ((long)prev * prev);
            if (power % 2 != 0) return (int)((prev2 * num));
            return (int)prev2;
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;

namespace ContestTemplateStartUp
{
    class ProgramA_
    {

        static void Main(string[] args)
        {
            var results = new List<long>();
            foreach (var test in Enumerable.Range(0, GetIntFromReadLine()))
            {
                var nx = Console.ReadLine().Split().Select(int.Parse).ToArray();
                var h = nx[0];
                var c = nx[1];
                var tar = nx[2];
                var tar2 = 2 * tar;
                if (tar2 <= (h + c)) { results.Add(2); }
                else
                {
                    //double kf = (tar - c) / (2.0 * tar - h - c);
                    //int fl =  (int)Math.Floor(kf);
                    long fl = lower_bound(h, c, tar);
                    var vars = new[] { fl, fl-1, fl + 1}
                        .Where(x => x >= 1)
                        .OrderBy(x => x)
                        .ToArray();

                    var min = double.MaxValue;
                    var resK = -1L;
                    foreach (var k in vars)
                    {
                        var v = Math.Abs((k * h + (k - 1) * c) / (2.0*k-1) - tar);
                        if (v < min)
                        {
                            min = v;
                            resK = k;
                        }
                    }
                    results.Add(2*resK-1);
                }
            }

            foreach (var result in results)
            {
                Console.WriteLine(result);
            }
        }

        static long lower_bound(int h, int c, int t)
        {
            long l = 1;
            long r = int.MaxValue;
            while (l + 1 < r)
            {
                long mid = (r + l) / 2;
                if (mid*h+(mid-1)*c >= t*(2*mid-1))
                {
                    l = mid;
                }
                else
                {
                    r = mid;
                }
            }
            return r;
        }

        private static int[] GetPrimes(int n)
        {
            var list = new List<int>();
            while (true)
            {
                var del = GetMinDel(n);
                if (del == 1)
                {
                    break;
                }
                list.Add(del);
                n = n / del;
            }
            return list.ToArray();
        }

        private static int GetMinDel(int n)
        {
            for (long index = 2; index * index <= n; ++index)
            {
                if (n % index == 0)
                {
                    return (int)index;
                }
            }
            return n;
        }

        public static bool Success(int[] chet, int[] nechet)
        {
            foreach (var ch in chet)
                foreach (var nch in nechet)
                {
                    if (Math.Abs(ch - nch) == 1)
                    {
                        return true;
                    }
                }
            return false;
        }

        static int GetInt()
        {
            int integer = 0;
            int n = Console.Read();
            while (n == ' ' || n == '\n' || n == '\r' || n == '\t' || n == -1)
                n = Console.Read();
            while (n >= '0' && n <= '9')
            {
                integer = integer * 10 + n - '0';
                n = Console.Read();
            }
            return integer;
        }
        static int[] ReadArray(int count)
        {
            int[] arr = new int[count];
            for (var index = 0; index < count; ++index)
            {
                arr[index] = GetInt();
            }
            return arr;

        }

        static int[] ReadArrayFromReadLine()
        {
            return Console.ReadLine().Split().Select(int.Parse).ToArray();
        }

        static int GetIntFromReadLine()
        {
            return int.Parse(Console.ReadLine());
        }

        public static int GetPower_(int num, int power)
        {
            if (power == 0) return 1;
            if (power == 1) return num;
            var prev = GetPower_(num, power / 2);
            var prev2 = ((long)prev * prev);
            if (power % 2 != 0) return (int)((prev2 * num));
            return (int)prev2;
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;

namespace ContestTemplateStartUp
{
    class ProgramA_
    {

        static void Main(string[] args)
        {
            var results = new List<long>();
            foreach (var test in Enumerable.Range(0, GetIntFromReadLine()))
            {
                var nx = Console.ReadLine().Split().Select(int.Parse).ToArray();
                var h = nx[0];
                var c = nx[1];
                var tar = nx[2];
                var tar2 = 2 * tar;
                if (tar2 <= (h + c)) { results.Add(2); }
                else
                {
                    //double kf = (tar - c) / (2.0 * tar - h - c);
                    //int fl =  (int)Math.Floor(kf);
                    long fl = lower_bound(h, c, tar);
                    var vars = new[] { fl, fl-1, fl + 1 }
                        .Where(x => x >= 1)
                        .OrderBy(x => x)
                        .ToArray();

                    var min = double.MaxValue;
                    var resK = -1L;
                    foreach (var k in vars)
                    {
                        var v = Math.Abs(((k * h + (k - 1) * c) - tar*(2*k-1)) / (2.0 * k - 1));
                        if (v < min)
                        {
                            min = v;
                            resK = k;
                        }
                    }
                    results.Add(2*resK-1);
                }
            }

            foreach (var result in results)
            {
                Console.WriteLine(result);
            }
        }

        static long lower_bound(int h, int c, int t)
        {
            long l = 1;
            long r = int.MaxValue;
            while (l + 1 < r)
            {
                long mid = (r + l) / 2;
                if (mid*h+(mid-1)*c >= t*(2*mid-1))
                {
                    l = mid;
                }
                else
                {
                    r = mid;
                }
            }
            return r;
        }

        private static int[] GetPrimes(int n)
        {
            var list = new List<int>();
            while (true)
            {
                var del = GetMinDel(n);
                if (del == 1)
                {
                    break;
                }
                list.Add(del);
                n = n / del;
            }
            return list.ToArray();
        }

        private static int GetMinDel(int n)
        {
            for (long index = 2; index * index <= n; ++index)
            {
                if (n % index == 0)
                {
                    return (int)index;
                }
            }
            return n;
        }

        public static bool Success(int[] chet, int[] nechet)
        {
            foreach (var ch in chet)
                foreach (var nch in nechet)
                {
                    if (Math.Abs(ch - nch) == 1)
                    {
                        return true;
                    }
                }
            return false;
        }

        static int GetInt()
        {
            int integer = 0;
            int n = Console.Read();
            while (n == ' ' || n == '\n' || n == '\r' || n == '\t' || n == -1)
                n = Console.Read();
            while (n >= '0' && n <= '9')
            {
                integer = integer * 10 + n - '0';
                n = Console.Read();
            }
            return integer;
        }
        static int[] ReadArray(int count)
        {
            int[] arr = new int[count];
            for (var index = 0; index < count; ++index)
            {
                arr[index] = GetInt();
            }
            return arr;

        }

        static int[] ReadArrayFromReadLine()
        {
            return Console.ReadLine().Split().Select(int.Parse).ToArray();
        }

        static int GetIntFromReadLine()
        {
            return int.Parse(Console.ReadLine());
        }

        public static int GetPower_(int num, int power)
        {
            if (power == 0) return 1;
            if (power == 1) return num;
            var prev = GetPower_(num, power / 2);
            var prev2 = ((long)prev * prev);
            if (power % 2 != 0) return (int)((prev2 * num));
            return (int)prev2;
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;

namespace ContestTemplateStartUp
{
    class ProgramA_
    {

        static void Main(string[] args)
        {
            var results = new List<long>();
            foreach (var test in Enumerable.Range(0, GetIntFromReadLine()))
            {
                var nx = Console.ReadLine().Split().Select(int.Parse).ToArray();
                var h = nx[0];
                var c = nx[1];
                var tar = nx[2];
                var tar2 = 2 * tar;
                if (tar2 <= (h + c)) { results.Add(2); }
                else
                {
                    //double kf = (tar - c) / (2.0 * tar - h - c);
                    //int fl =  (int)Math.Floor(kf);
                    long fl = lower_bound(h, c, tar);
                    var vars = new[] { fl, fl + 1 }
                        .Where(x => x >= 1)
                        .OrderBy(x => x)
                        .ToArray();

                    var min = double.MaxValue;
                    var resK = -1L;
                    foreach (var k in vars)
                    {
                        var v = Math.Abs(((k * h + (k - 1) * c) - tar*(2*k-1)) / (2.0 * k - 1));
                        if (v < min)
                        {
                            min = v;
                            resK = k;
                        }
                    }
                    results.Add(2*resK-1);
                }
            }

            foreach (var result in results)
            {
                Console.WriteLine(result);
            }
        }

        static long lower_bound(int h, int c, int t)
        {
            long l = 1;
            long r = int.MaxValue;
            while (l + 1 < r)
            {
                long mid = (r + l) / 2;
                if (mid*h+(mid-1)*c >= t*(2*mid-1))
                {
                    l = mid;
                }
                else
                {
                    r = mid;
                }
            }
            return r;
        }

        private static int[] GetPrimes(int n)
        {
            var list = new List<int>();
            while (true)
            {
                var del = GetMinDel(n);
                if (del == 1)
                {
                    break;
                }
                list.Add(del);
                n = n / del;
            }
            return list.ToArray();
        }

        private static int GetMinDel(int n)
        {
            for (long index = 2; index * index <= n; ++index)
            {
                if (n % index == 0)
                {
                    return (int)index;
                }
            }
            return n;
        }

        public static bool Success(int[] chet, int[] nechet)
        {
            foreach (var ch in chet)
                foreach (var nch in nechet)
                {
                    if (Math.Abs(ch - nch) == 1)
                    {
                        return true;
                    }
                }
            return false;
        }

        static int GetInt()
        {
            int integer = 0;
            int n = Console.Read();
            while (n == ' ' || n == '\n' || n == '\r' || n == '\t' || n == -1)
                n = Console.Read();
            while (n >= '0' && n <= '9')
            {
                integer = integer * 10 + n - '0';
                n = Console.Read();
            }
            return integer;
        }
        static int[] ReadArray(int count)
        {
            int[] arr = new int[count];
            for (var index = 0; index < count; ++index)
            {
                arr[index] = GetInt();
            }
            return arr;

        }

        static int[] ReadArrayFromReadLine()
        {
            return Console.ReadLine().Split().Select(int.Parse).ToArray();
        }

        static int GetIntFromReadLine()
        {
            return int.Parse(Console.ReadLine());
        }

        public static int GetPower_(int num, int power)
        {
            if (power == 0) return 1;
            if (power == 1) return num;
            var prev = GetPower_(num, power / 2);
            var prev2 = ((long)prev * prev);
            if (power % 2 != 0) return (int)((prev2 * num));
            return (int)prev2;
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;

namespace ContestTemplateStartUp
{
    class ProgramA_
    {

        static void Main(string[] args)
        {
            var results = new List<int>();
            foreach (var test in Enumerable.Range(0, GetIntFromReadLine()))
            {
                var nx = Console.ReadLine().Split().Select(int.Parse).ToArray();
                var h = nx[0];
                var c = nx[1];
                var tar = nx[2];
                var tar2 = 2 * tar;
                if (tar2 <= (h + c)) { results.Add(2); }
                else
                {
                    double kf = (tar - c) / (2.0 * tar - h - c);
                    int fl = (int)Math.Floor(kf);
                    var vars = new[] { fl, fl - 1, fl + 1}
                        .Where(x => x >= 1)
                        .ToArray();
                    var min = double.MaxValue;
                    var resK = -1;
                    foreach (var k in vars)
                    {
                        var v = Math.Abs((k * h + (k - 1) * c) / (2.0*k-1) - tar);
                        if (v < min)
                        {
                            min = v;
                            resK = k;
                        }
                    }
                    results.Add(2*resK-1);
                }
            }

            foreach (var result in results)
            {
                Console.WriteLine(result);
            }
        }

        private static int[] GetPrimes(int n)
        {
            var list = new List<int>();
            while (true)
            {
                var del = GetMinDel(n);
                if (del == 1)
                {
                    break;
                }
                list.Add(del);
                n = n / del;
            }
            return list.ToArray();
        }

        private static int GetMinDel(int n)
        {
            for (long index = 2; index * index <= n; ++index)
            {
                if (n % index == 0)
                {
                    return (int)index;
                }
            }
            return n;
        }

        public static bool Success(int[] chet, int[] nechet)
        {
            foreach (var ch in chet)
                foreach (var nch in nechet)
                {
                    if (Math.Abs(ch - nch) == 1)
                    {
                        return true;
                    }
                }
            return false;
        }

        static int GetInt()
        {
            int integer = 0;
            int n = Console.Read();
            while (n == ' ' || n == '\n' || n == '\r' || n == '\t' || n == -1)
                n = Console.Read();
            while (n >= '0' && n <= '9')
            {
                integer = integer * 10 + n - '0';
                n = Console.Read();
            }
            return integer;
        }
        static int[] ReadArray(int count)
        {
            int[] arr = new int[count];
            for (var index = 0; index < count; ++index)
            {
                arr[index] = GetInt();
            }
            return arr;

        }

        static int[] ReadArrayFromReadLine()
        {
            return Console.ReadLine().Split().Select(int.Parse).ToArray();
        }

        static int GetIntFromReadLine()
        {
            return int.Parse(Console.ReadLine());
        }

        public static int GetPower_(int num, int power)
        {
            if (power == 0) return 1;
            if (power == 1) return num;
            var prev = GetPower_(num, power / 2);
            var prev2 = ((long)prev * prev);
            if (power % 2 != 0) return (int)((prev2 * num));
            return (int)prev2;
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;

namespace ContestTemplateStartUp
{
    class ProgramA_
    {

        static void Main(string[] args)
        {
            var results = new List<long>();
            foreach (var test in Enumerable.Range(0, GetIntFromReadLine()))
            {
                var nx = Console.ReadLine().Split().Select(int.Parse).ToArray();
                var h = nx[0];
                var c = nx[1];
                var tar = nx[2];
                var tar2 = 2 * tar;
                if (tar2 <= (h + c)) { results.Add(2); }
                else
                {
                    double kf = (tar - c) / (2.0 * tar - h - c);
                    int fl = (int)Math.Floor(kf);
                    var vars = new[] { fl, fl - 1, fl + 1L, 2 }
                        .Where(x => x >= 1)
                        .OrderBy(x => x)
                        .ToArray();

                    var min = double.MaxValue;
                    var resK = -1L;
                    foreach (var k in vars)
                    {
                        var v = Math.Abs((k * h + (k - 1) * c) / (2.0*k-1) - tar);
                        if (v < min)
                        {
                            min = v;
                            resK = k;
                        }
                    }
                    results.Add(2*resK-1);
                }
            }

            foreach (var result in results)
            {
                Console.WriteLine(result);
            }
        }

        private static int[] GetPrimes(int n)
        {
            var list = new List<int>();
            while (true)
            {
                var del = GetMinDel(n);
                if (del == 1)
                {
                    break;
                }
                list.Add(del);
                n = n / del;
            }
            return list.ToArray();
        }

        private static int GetMinDel(int n)
        {
            for (long index = 2; index * index <= n; ++index)
            {
                if (n % index == 0)
                {
                    return (int)index;
                }
            }
            return n;
        }

        public static bool Success(int[] chet, int[] nechet)
        {
            foreach (var ch in chet)
                foreach (var nch in nechet)
                {
                    if (Math.Abs(ch - nch) == 1)
                    {
                        return true;
                    }
                }
            return false;
        }

        static int GetInt()
        {
            int integer = 0;
            int n = Console.Read();
            while (n == ' ' || n == '\n' || n == '\r' || n == '\t' || n == -1)
                n = Console.Read();
            while (n >= '0' && n <= '9')
            {
                integer = integer * 10 + n - '0';
                n = Console.Read();
            }
            return integer;
        }
        static int[] ReadArray(int count)
        {
            int[] arr = new int[count];
            for (var index = 0; index < count; ++index)
            {
                arr[index] = GetInt();
            }
            return arr;

        }

        static int[] ReadArrayFromReadLine()
        {
            return Console.ReadLine().Split().Select(int.Parse).ToArray();
        }

        static int GetIntFromReadLine()
        {
            return int.Parse(Console.ReadLine());
        }

        public static int GetPower_(int num, int power)
        {
            if (power == 0) return 1;
            if (power == 1) return num;
            var prev = GetPower_(num, power / 2);
            var prev2 = ((long)prev * prev);
            if (power % 2 != 0) return (int)((prev2 * num));
            return (int)prev2;
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;

namespace ContestTemplateStartUp
{
    class ProgramA_
    {

        static void Main(string[] args)
        {
            var results = new List<long>();
            foreach (var test in Enumerable.Range(0, GetIntFromReadLine()))
            {
                var nx = Console.ReadLine().Split().Select(int.Parse).ToArray();
                var h = nx[0];
                var c = nx[1];
                var tar = nx[2];
                var tar2 = 2 * tar;
                if (tar2 <= (h + c)) { results.Add(2); }
                else
                {
                    double kf = (tar - c) / (2.0 * tar - h - c);
                    int fl =  (int)Math.Floor(kf);
                    //long fl = lower_bound(h, c, tar);
                    var vars = new[] { fl - 1, fl, fl + 1 }
                        .Where(x => x >= 1)
                        .OrderBy(x => x)
                        .ToArray();

                    var min = double.MaxValue;
                    var resK = -1L;
                    foreach (var k in vars)
                    {
                        var v = Math.Abs(((k * h + (k - 1) * c) - tar*(2*k-1)) / (2.0 * k - 1));
                        if (v < min)
                        {
                            min = v;
                            resK = k;
                        }
                    }
                    results.Add(2*resK-1);
                }
            }

            foreach (var result in results)
            {
                Console.WriteLine(result);
            }
        }

        static long lower_bound(int h, int c, int t)
        {
            long l = 1;
            long r = int.MaxValue;
            while (l + 1 < r)
            {
                long mid = (r + l) / 2;
                if (mid*h+(mid-1)*c >= t*(2*mid-1))
                {
                    l = mid;
                }
                else
                {
                    r = mid;
                }
            }
            return r;
        }

        private static int[] GetPrimes(int n)
        {
            var list = new List<int>();
            while (true)
            {
                var del = GetMinDel(n);
                if (del == 1)
                {
                    break;
                }
                list.Add(del);
                n = n / del;
            }
            return list.ToArray();
        }

        private static int GetMinDel(int n)
        {
            for (long index = 2; index * index <= n; ++index)
            {
                if (n % index == 0)
                {
                    return (int)index;
                }
            }
            return n;
        }

        public static bool Success(int[] chet, int[] nechet)
        {
            foreach (var ch in chet)
                foreach (var nch in nechet)
                {
                    if (Math.Abs(ch - nch) == 1)
                    {
                        return true;
                    }
                }
            return false;
        }

        static int GetInt()
        {
            int integer = 0;
            int n = Console.Read();
            while (n == ' ' || n == '\n' || n == '\r' || n == '\t' || n == -1)
                n = Console.Read();
            while (n >= '0' && n <= '9')
            {
                integer = integer * 10 + n - '0';
                n = Console.Read();
            }
            return integer;
        }
        static int[] ReadArray(int count)
        {
            int[] arr = new int[count];
            for (var index = 0; index < count; ++index)
            {
                arr[index] = GetInt();
            }
            return arr;

        }

        static int[] ReadArrayFromReadLine()
        {
            return Console.ReadLine().Split().Select(int.Parse).ToArray();
        }

        static int GetIntFromReadLine()
        {
            return int.Parse(Console.ReadLine());
        }

        public static int GetPower_(int num, int power)
        {
            if (power == 0) return 1;
            if (power == 1) return num;
            var prev = GetPower_(num, power / 2);
            var prev2 = ((long)prev * prev);
            if (power % 2 != 0) return (int)((prev2 * num));
            return (int)prev2;
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;

namespace ContestTemplateStartUp
{
    class ProgramA_
    {

        static void Main(string[] args)
        {
            var results = new List<long>();
            foreach (var test in Enumerable.Range(0, GetIntFromReadLine()))
            {
                var nx = Console.ReadLine().Split().Select(int.Parse).ToArray();
                var h = nx[0];
                var c = nx[1];
                var tar = nx[2];
                var tar2 = 2 * tar;
                if (tar2 <= (h + c)) { results.Add(2); }
                else
                {
                    //double kf = (tar - c) / (2.0 * tar - h - c);
                    //int fl =  (int)Math.Floor(kf);
                    long fl = lower_bound(h, c, tar);
                    var vars = new[] { fl, fl-1}
                        .Where(x => x >= 1)
                        .OrderBy(x => x)
                        .ToArray();

                    var min = double.MaxValue;
                    var resK = -1L;
                    foreach (var k in vars)
                    {
                        var v = Math.Abs((k * h + (k - 1) * c) / (2.0*k-1) - tar);
                        if (v < min)
                        {
                            min = v;
                            resK = k;
                        }
                    }
                    results.Add(2*resK-1);
                }
            }

            foreach (var result in results)
            {
                Console.WriteLine(result);
            }
        }

        static long lower_bound(int h, int c, int t)
        {
            long l = 1;
            long r = int.MaxValue;
            while (l + 1 < r)
            {
                long mid = (r + l) / 2;
                if (mid*h+(mid-1)*c >= t*(2*mid-1))
                {
                    l = mid;
                }
                else
                {
                    r = mid;
                }
            }
            return r;
        }

        private static int[] GetPrimes(int n)
        {
            var list = new List<int>();
            while (true)
            {
                var del = GetMinDel(n);
                if (del == 1)
                {
                    break;
                }
                list.Add(del);
                n = n / del;
            }
            return list.ToArray();
        }

        private static int GetMinDel(int n)
        {
            for (long index = 2; index * index <= n; ++index)
            {
                if (n % index == 0)
                {
                    return (int)index;
                }
            }
            return n;
        }

        public static bool Success(int[] chet, int[] nechet)
        {
            foreach (var ch in chet)
                foreach (var nch in nechet)
                {
                    if (Math.Abs(ch - nch) == 1)
                    {
                        return true;
                    }
                }
            return false;
        }

        static int GetInt()
        {
            int integer = 0;
            int n = Console.Read();
            while (n == ' ' || n == '\n' || n == '\r' || n == '\t' || n == -1)
                n = Console.Read();
            while (n >= '0' && n <= '9')
            {
                integer = integer * 10 + n - '0';
                n = Console.Read();
            }
            return integer;
        }
        static int[] ReadArray(int count)
        {
            int[] arr = new int[count];
            for (var index = 0; index < count; ++index)
            {
                arr[index] = GetInt();
            }
            return arr;

        }

        static int[] ReadArrayFromReadLine()
        {
            return Console.ReadLine().Split().Select(int.Parse).ToArray();
        }

        static int GetIntFromReadLine()
        {
            return int.Parse(Console.ReadLine());
        }

        public static int GetPower_(int num, int power)
        {
            if (power == 0) return 1;
            if (power == 1) return num;
            var prev = GetPower_(num, power / 2);
            var prev2 = ((long)prev * prev);
            if (power % 2 != 0) return (int)((prev2 * num));
            return (int)prev2;
        }
    }
}


use std::fmt::Debug;
use std::str::FromStr;

pub struct TokenReader {
    reader: std::io::Stdin,
    tokens: Vec<String>,
    index: usize,
}

impl TokenReader {
    fn new() -> Self {
        TokenReader {
            reader: std::io::stdin(),
            tokens: Vec::new(),
            index: 0,
        }
    }

    pub fn next<T>(&mut self) -> T
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index += 1;
        self.tokens[self.index - 1].parse().unwrap()
    }

    pub fn vector<T>(&mut self) -> Vec<T>
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index = self.tokens.len();
        self.tokens.iter().map(|tok| tok.parse().unwrap()).collect()
    }

    pub fn load_next_line(&mut self) {
        let mut line = String::new();
        self.reader.read_line(&mut line).unwrap();

        self.tokens = line
            .split_whitespace()
            .map(|tok| tok.to_string())
            .collect::<Vec<String>>();
        self.index = 0;
    }
}

fn temp(hot: i32, cold: i32, time: i32) -> f64 {
    let sum = (time + 1) / 2 * hot + (time / 2) * cold;
    (sum as f64) / (time as f64)
}

fn solve(hot: i32, cold: i32, wanted: f64) -> i32 {
    let mut time = 1;
    let mut diff = (temp(hot, cold, time) - wanted).abs();

    let mid = temp(hot, cold, 2);
    if (mid - wanted).abs() < diff {
        time = 2;
        diff = (mid - wanted).abs();
    }

    let radius = 10000;
    let mut x = radius;

    if (2.0 * wanted) as i32 != hot + cold {
        x = ((hot as f64 - wanted) / (2.0 * wanted - cold as f64 - hot as f64)) as i32;
    }

    for i in (x - radius)..(x + radius) {
        if x < 1 {
            continue;
        }
        let curr = temp(hot, cold, i);
        if (curr - wanted).abs() < diff {
            time = i;
            diff = (curr - wanted).abs();
        }
    }
    time
}

fn main() {
    let mut reader = TokenReader::new();
    let tests = reader.next::<i32>();

    for _ in 0..tests {
        let hot = reader.next::<i32>();
        let cold = reader.next::<i32>();
        let wanted = reader.next::<f64>();

        let res = solve(hot, cold, wanted);
        println!("{}", res);
    }
}


use std::fmt::Debug;
use std::str::FromStr;

pub struct TokenReader {
    reader: std::io::Stdin,
    tokens: Vec<String>,
    index: usize,
}

impl TokenReader {
    fn new() -> Self {
        TokenReader {
            reader: std::io::stdin(),
            tokens: Vec::new(),
            index: 0,
        }
    }

    pub fn next<T>(&mut self) -> T
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index += 1;
        self.tokens[self.index - 1].parse().unwrap()
    }

    pub fn vector<T>(&mut self) -> Vec<T>
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index = self.tokens.len();
        self.tokens.iter().map(|tok| tok.parse().unwrap()).collect()
    }

    pub fn load_next_line(&mut self) {
        let mut line = String::new();
        self.reader.read_line(&mut line).unwrap();

        self.tokens = line
            .split_whitespace()
            .map(|tok| tok.to_string())
            .collect::<Vec<String>>();
        self.index = 0;
    }
}

fn temp(hot: i64, cold: i64, time: i64) -> f64 {
    let sum = (time + 1) / 2 * hot + (time / 2) * cold;
    (sum as f64) / (time as f64)
}

fn solve(hot: i64, cold: i64, wanted: f64) -> i64 {
    let mut time = 1;
    let mut diff = (temp(hot, cold, time) - wanted).abs();

    let mid = temp(hot, cold, 2);
    if (mid - wanted).abs() < diff {
        time = 2;
        diff = (mid - wanted).abs();
    }

    let mut index = 1;
    let mut power = 1 << 30;

    while power > 0 {
        let next = index + power;
        power >>= 1;

        let curr = temp(hot, cold, next);
        if curr > wanted {
            index = next;
        }

        if (curr - wanted).abs() < diff {
            time = next;
            diff = (curr - wanted).abs();
        }
    }
    time
}

fn main() {
    let mut reader = TokenReader::new();
    let tests = reader.next::<i64>();

    for _ in 0..tests {
        let hot = reader.next::<i64>();
        let cold = reader.next::<i64>();
        let wanted = reader.next::<f64>();

        let res = solve(hot, cold, wanted);
        println!("{}", res);
    }
}


use std::fmt::Debug;
use std::str::FromStr;

struct TokenReader {
    reader: std::io::Stdin,
    tokens: Vec<String>,
    index: usize,
}

impl TokenReader {
    fn new() -> Self {
        TokenReader {
            reader: std::io::stdin(),
            tokens: Vec::new(),
            index: 0,
        }
    }

    fn next<T>(&mut self) -> T
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index += 1;
        self.tokens[self.index - 1].parse().unwrap()
    }

    fn vector<T>(&mut self) -> Vec<T>
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index = self.tokens.len();
        self.tokens.iter().map(|tok| tok.parse().unwrap()).collect()
    }

    fn load_next_line(&mut self) {
        let mut line = String::new();
        self.reader.read_line(&mut line).unwrap();

        self.tokens = line
            .split_whitespace()
            .map(|tok| tok.to_string())
            .collect::<Vec<String>>();
        self.index = 0;
    }
}

fn temp(hot: i32, cold: i32, time: i32) -> f64 {
    let sum = (time + 1) / 2 * hot + (time / 2) * cold;
    (sum as f64) / (time as f64)
}

fn solve(hot: i32, cold: i32, wanted: f64) -> i32 {
    let mut diff = std::f64::MAX;
    let mut time = 1;

    for t in 1..100000 {
        let curr = temp(hot, cold, t);
        if (wanted - curr).abs() < diff {
            diff = (wanted - curr).abs();
            time = t;
        }
    }
    time
}

fn main() {
    let mut reader = TokenReader::new();
    let tests = reader.next::<i32>();

    for _ in 0..tests {
        let hot = reader.next::<i32>();
        let cold = reader.next::<i32>();
        let wanted = reader.next::<f64>();

        let res = solve(hot, cold, wanted);
        println!("{}", res);
    }
}


use std::fmt::Debug;
use std::str::FromStr;

pub struct TokenReader {
    reader: std::io::Stdin,
    tokens: Vec<String>,
    index: usize,
}

impl TokenReader {
    fn new() -> Self {
        TokenReader {
            reader: std::io::stdin(),
            tokens: Vec::new(),
            index: 0,
        }
    }

    pub fn next<T>(&mut self) -> T
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index += 1;
        self.tokens[self.index - 1].parse().unwrap()
    }

    pub fn vector<T>(&mut self) -> Vec<T>
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index = self.tokens.len();
        self.tokens.iter().map(|tok| tok.parse().unwrap()).collect()
    }

    pub fn load_next_line(&mut self) {
        let mut line = String::new();
        self.reader.read_line(&mut line).unwrap();

        self.tokens = line
            .split_whitespace()
            .map(|tok| tok.to_string())
            .collect::<Vec<String>>();
        self.index = 0;
    }
}

fn temp(hot: i32, cold: i32, time: i32) -> f64 {
    let sum = (time + 1) / 2 * hot + (time / 2) * cold;
    (sum as f64) / (time as f64)
}

fn solve(hot: i32, cold: i32, wanted: f64) -> i32 {
    let mut diff = std::f64::MAX;
    let mut time = 1;

    let div = (2.0 * wanted) as i32 - hot - cold;
    let mid: i32 = if div != 0 { hot / div } else { 50 };

    for t in (mid - 100)..(mid + 100) {
        if t < 1 {
            continue;
        }
        let curr = temp(hot, cold, t);
        if (wanted - curr).abs() < diff {
            diff = (wanted - curr).abs();
            time = t;
        }
    }
    time
}

fn main() {
    let mut reader = TokenReader::new();
    let tests = reader.next::<i32>();

    for _ in 0..tests {
        let hot = reader.next::<i32>();
        let cold = reader.next::<i32>();
        let wanted = reader.next::<f64>();

        let res = solve(hot, cold, wanted);
        println!("{}", res);
    }
}


use std::fmt::Debug;
use std::str::FromStr;

struct TokenReader {
    reader: std::io::Stdin,
    tokens: Vec<String>,
    index: usize,
}

impl TokenReader {
    fn new() -> Self {
        TokenReader {
            reader: std::io::stdin(),
            tokens: Vec::new(),
            index: 0,
        }
    }

    fn next<T>(&mut self) -> T
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index += 1;
        self.tokens[self.index - 1].parse().unwrap()
    }

    fn vector<T>(&mut self) -> Vec<T>
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index = self.tokens.len();
        self.tokens.iter().map(|tok| tok.parse().unwrap()).collect()
    }

    fn load_next_line(&mut self) {
        let mut line = String::new();
        self.reader.read_line(&mut line).unwrap();

        self.tokens = line
            .split_whitespace()
            .map(|tok| tok.to_string())
            .collect::<Vec<String>>();
        self.index = 0;
    }
}

fn temp(hot: i32, cold: i32, time: i32) -> f64 {
    let sum = (time + 1) / 2 * hot + (time / 2) * cold;
    (sum as f64) / (time as f64)
}

fn solve(hot: i32, cold: i32, wanted: f64) -> i32 {
    let mut diff = std::f64::MAX;
    let mut time = 1;

    for t in 1..10000 {
        let curr = temp(hot, cold, t);
        if (wanted - curr).abs() < diff {
            diff = (wanted - curr).abs();
            time = t;
        }
    }
    time
}

fn main() {
    let mut reader = TokenReader::new();
    let tests = reader.next::<i32>();

    for _ in 0..tests {
        let hot = reader.next::<i32>();
        let cold = reader.next::<i32>();
        let wanted = reader.next::<f64>();

        let res = solve(hot, cold, wanted);
        println!("{}", res);
    }
}


use std::fmt::Debug;
use std::str::FromStr;

pub struct TokenReader {
    reader: std::io::Stdin,
    tokens: Vec<String>,
    index: usize,
}

impl TokenReader {
    fn new() -> Self {
        TokenReader {
            reader: std::io::stdin(),
            tokens: Vec::new(),
            index: 0,
        }
    }

    pub fn next<T>(&mut self) -> T
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index += 1;
        self.tokens[self.index - 1].parse().unwrap()
    }

    pub fn vector<T>(&mut self) -> Vec<T>
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index = self.tokens.len();
        self.tokens.iter().map(|tok| tok.parse().unwrap()).collect()
    }

    pub fn load_next_line(&mut self) {
        let mut line = String::new();
        self.reader.read_line(&mut line).unwrap();

        self.tokens = line
            .split_whitespace()
            .map(|tok| tok.to_string())
            .collect::<Vec<String>>();
        self.index = 0;
    }
}

fn degrees(hot: i64, cold: i64, time: i64) -> f64 {
    ((time + 1) / 2 * hot + time / 2 * cold) as f64
}

fn better(hot: i64, cold: i64, wanted: f64, a: i64, b: i64) -> i64 {
    let na = (degrees(hot, cold, a) - a as f64 * wanted).abs();
    let nb = (degrees(hot, cold, b) - b as f64 * wanted).abs();

    if na * b as f64 == nb * a as f64 {
        return std::cmp::min(a, b);
    }

    if na * b as f64 <= nb * a as f64 { a } else { b }
}

fn solve(hot: i64, cold: i64, wanted: f64) -> i64 {
    let mut time = better(hot, cold, wanted, 1, 2);
    let mut index = 1;
    let mut power = 1 << 30;

    while power > 0 {
        let next = index + power;
        power >>= 1;

        let curr = degrees(hot, cold, next) / next as f64;
        if curr > wanted {
            index = next;
        }

        time = better(hot, cold, wanted, time, next);
    }
    time
}

fn main() {
    let mut reader = TokenReader::new();
    let tests = reader.next::<i64>();

    for _ in 0..tests {
        let hot = reader.next::<i64>();
        let cold = reader.next::<i64>();
        let wanted = reader.next::<f64>();

        let res = solve(hot, cold, wanted);
        println!("{}", res);
    }
}


use std::fmt::Debug;
use std::str::FromStr;

pub struct TokenReader {
    reader: std::io::Stdin,
    tokens: Vec<String>,
    index: usize,
}

impl TokenReader {
    fn new() -> Self {
        TokenReader {
            reader: std::io::stdin(),
            tokens: Vec::new(),
            index: 0,
        }
    }

    pub fn next<T>(&mut self) -> T
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index += 1;
        self.tokens[self.index - 1].parse().unwrap()
    }

    pub fn vector<T>(&mut self) -> Vec<T>
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index = self.tokens.len();
        self.tokens.iter().map(|tok| tok.parse().unwrap()).collect()
    }

    pub fn load_next_line(&mut self) {
        let mut line = String::new();
        self.reader.read_line(&mut line).unwrap();

        self.tokens = line
            .split_whitespace()
            .map(|tok| tok.to_string())
            .collect::<Vec<String>>();
        self.index = 0;
    }
}

fn temp(hot: i64, cold: i64, time: i64) -> f64 {
    let sum = (time + 1) / 2 * hot + (time / 2) * cold;
    (sum as f64) / (time as f64)
}

fn solve(hot: i64, cold: i64, wanted: f64) -> i64 {
    let mut time = 1;
    let mut diff = (temp(hot, cold, time) - wanted).abs();

    let avg = temp(hot, cold, 2);
    if (avg - wanted).abs() < diff {
        time = 2;
        diff = (avg - wanted).abs();
    }

    let mut index = 1;
    let mut power = 1 << 30;

    while power > 0 {
        let next = index + power;
        power >>= 1;

        let curr = temp(hot, cold, next);
        if curr > wanted {
            index = next;
        }

        if (curr - wanted).abs() < diff {
            time = next;
            diff = (curr - wanted).abs();
        } else if (curr - wanted).abs() == diff && next < time {
            time = next;
        }
    }
    time
}

fn main() {
    let mut reader = TokenReader::new();
    let tests = reader.next::<i64>();

    for _ in 0..tests {
        let hot = reader.next::<i64>();
        let cold = reader.next::<i64>();
        let wanted = reader.next::<f64>();

        let res = solve(hot, cold, wanted);
        println!("{}", res);
    }
}


use std::fmt::Debug;
use std::str::FromStr;

pub struct TokenReader {
    reader: std::io::Stdin,
    tokens: Vec<String>,
    index: usize,
}

impl TokenReader {
    fn new() -> Self {
        TokenReader {
            reader: std::io::stdin(),
            tokens: Vec::new(),
            index: 0,
        }
    }

    pub fn next<T>(&mut self) -> T
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index += 1;
        self.tokens[self.index - 1].parse().unwrap()
    }

    pub fn vector<T>(&mut self) -> Vec<T>
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index = self.tokens.len();
        self.tokens.iter().map(|tok| tok.parse().unwrap()).collect()
    }

    pub fn load_next_line(&mut self) {
        let mut line = String::new();
        self.reader.read_line(&mut line).unwrap();

        self.tokens = line
            .split_whitespace()
            .map(|tok| tok.to_string())
            .collect::<Vec<String>>();
        self.index = 0;
    }
}

fn temp(hot: i32, cold: i32, time: i32) -> f64 {
    let sum = (time + 1) / 2 * hot + (time / 2) * cold;
    (sum as f64) / (time as f64)
}

fn solve(hot: i32, cold: i32, wanted: f64) -> i32 {
    let mut time = 1;
    let mut diff = (temp(hot, cold, time) - wanted).abs();

    let mid = temp(hot, cold, 2);
    if (mid - wanted).abs() < diff {
        time = 2;
        diff = (mid - wanted).abs();
    }

    let radius = 100;
    let mut x = radius;

    if (2.0 * wanted) as i32 != hot + cold {
        x = ((hot as f64 - wanted) / (2.0 * wanted - cold as f64 - hot as f64)) as i32;
    }

    for i in (x - radius)..(x + radius) {
        if x < 1 {
            continue;
        }
        let curr = temp(hot, cold, i);
        if (curr - wanted).abs() < diff {
            time = i;
            diff = (curr - wanted).abs();
        }
    }
    time
}

fn main() {
    let mut reader = TokenReader::new();
    let tests = reader.next::<i32>();

    for _ in 0..tests {
        let hot = reader.next::<i32>();
        let cold = reader.next::<i32>();
        let wanted = reader.next::<f64>();

        let res = solve(hot, cold, wanted);
        println!("{}", res);
    }
}


use std::fmt::Debug;
use std::str::FromStr;

pub struct TokenReader {
    reader: std::io::Stdin,
    tokens: Vec<String>,
    index: usize,
}

impl TokenReader {
    fn new() -> Self {
        TokenReader {
            reader: std::io::stdin(),
            tokens: Vec::new(),
            index: 0,
        }
    }

    pub fn next<T>(&mut self) -> T
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index += 1;
        self.tokens[self.index - 1].parse().unwrap()
    }

    pub fn vector<T>(&mut self) -> Vec<T>
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index = self.tokens.len();
        self.tokens.iter().map(|tok| tok.parse().unwrap()).collect()
    }

    pub fn load_next_line(&mut self) {
        let mut line = String::new();
        self.reader.read_line(&mut line).unwrap();

        self.tokens = line
            .split_whitespace()
            .map(|tok| tok.to_string())
            .collect::<Vec<String>>();
        self.index = 0;
    }
}

fn temp(hot: i32, cold: i32, time: i32) -> f64 {
    let sum = (time + 1) / 2 * hot + (time / 2) * cold;
    (sum as f64) / (time as f64)
}

fn solve(hot: i32, cold: i32, wanted: f64) -> i32 {
    let mut diff = std::f64::MAX;
    let mut time = 1;

    let a = (hot as f64) / wanted;
    let b = (cold as f64) / wanted;
    let mid: i32 = if (a + b) > 2.0 { (a / (2.0 - a - b)) as i32 } else { 2 };

    for t in (mid - 50)..(mid + 50) {
        if t < 0 {
            continue;
        }
        let curr = temp(hot, cold, t);
        if (wanted - curr).abs() < diff {
            diff = (wanted - curr).abs();
            time = t;
        }
    }
    time
}

fn main() {
    let mut reader = TokenReader::new();
    let tests = reader.next::<i32>();

    for _ in 0..tests {
        let hot = reader.next::<i32>();
        let cold = reader.next::<i32>();
        let wanted = reader.next::<f64>();

        let res = solve(hot, cold, wanted);
        println!("{}", res);
    }
}


use std::fmt::Debug;
use std::str::FromStr;

pub struct TokenReader {
    reader: std::io::Stdin,
    tokens: Vec<String>,
    index: usize,
}

impl TokenReader {
    fn new() -> Self {
        TokenReader {
            reader: std::io::stdin(),
            tokens: Vec::new(),
            index: 0,
        }
    }

    pub fn next<T>(&mut self) -> T
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index += 1;
        self.tokens[self.index - 1].parse().unwrap()
    }

    pub fn vector<T>(&mut self) -> Vec<T>
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index = self.tokens.len();
        self.tokens.iter().map(|tok| tok.parse().unwrap()).collect()
    }

    pub fn load_next_line(&mut self) {
        let mut line = String::new();
        self.reader.read_line(&mut line).unwrap();

        self.tokens = line
            .split_whitespace()
            .map(|tok| tok.to_string())
            .collect::<Vec<String>>();
        self.index = 0;
    }
}

fn temp(hot: i64, cold: i64, time: i64) -> f64 {
    let sum = (time + 1) / 2 * hot + (time / 2) * cold;
    (sum as f64) / (time as f64)
}

fn solve(hot: i64, cold: i64, wanted: f64) -> i64 {
    let mut time = 1;
    let mut diff = (temp(hot, cold, time) - wanted).abs();

    let mid = temp(hot, cold, 2);
    if (mid - wanted).abs() < diff {
        time = 2;
        diff = (mid - wanted).abs();
    }

    let mut index = 1;
    let mut power = 1 << 30;

    while power > 0 {
        let next = index + power;
        power >>= 1;

        let curr = temp(hot, cold, next);
        if curr >= wanted {
            index = next;
        }

        if (curr - wanted).abs() < diff {
            time = next;
            diff = (curr - wanted).abs();
        }
    }
    time
}

fn main() {
    let mut reader = TokenReader::new();
    let tests = reader.next::<i64>();

    for _ in 0..tests {
        let hot = reader.next::<i64>();
        let cold = reader.next::<i64>();
        let wanted = reader.next::<f64>();

        let res = solve(hot, cold, wanted);
        println!("{}", res);
    }
}


use std::fmt::Debug;
use std::str::FromStr;

struct TokenReader {
    reader: std::io::Stdin,
    tokens: Vec<String>,
    index: usize,
}

impl TokenReader {
    fn new() -> Self {
        TokenReader {
            reader: std::io::stdin(),
            tokens: Vec::new(),
            index: 0,
        }
    }

    fn next<T>(&mut self) -> T
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index += 1;
        self.tokens[self.index - 1].parse().unwrap()
    }

    fn vector<T>(&mut self) -> Vec<T>
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index = self.tokens.len();
        self.tokens.iter().map(|tok| tok.parse().unwrap()).collect()
    }

    fn load_next_line(&mut self) {
        let mut line = String::new();
        self.reader.read_line(&mut line).unwrap();

        self.tokens = line
            .split_whitespace()
            .map(|tok| tok.to_string())
            .collect::<Vec<String>>();
        self.index = 0;
    }
}

fn temp(hot: i32, cold: i32, time: i32) -> f64 {
    let sum = (time + 1) / 2 * hot + (time / 2) * cold;
    (sum as f64) / (time as f64)
}

fn solve(hot: i32, cold: i32, wanted: f64) -> i32 {
    let mut diff = f64::MAX;
    let mut time = 1;

    for t in 1..10000 {
        let curr = temp(hot, cold, t);
        if (wanted - curr).abs() < diff {
            diff = (wanted - curr).abs();
            time = t;
        }
    }
    time
}

fn main() {
    let mut reader = TokenReader::new();
    let tests = reader.next::<i32>();

    for _ in 0..tests {
        let hot = reader.next::<i32>();
        let cold = reader.next::<i32>();
        let wanted = reader.next::<f64>();

        let res = solve(hot, cold, wanted);
        println!("{}", res);
    }
}


use std::fmt::Debug;
use std::str::FromStr;

pub struct TokenReader {
    reader: std::io::Stdin,
    tokens: Vec<String>,
    index: usize,
}

impl TokenReader {
    fn new() -> Self {
        TokenReader {
            reader: std::io::stdin(),
            tokens: Vec::new(),
            index: 0,
        }
    }

    pub fn next<T>(&mut self) -> T
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index += 1;
        self.tokens[self.index - 1].parse().unwrap()
    }

    pub fn vector<T>(&mut self) -> Vec<T>
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index = self.tokens.len();
        self.tokens.iter().map(|tok| tok.parse().unwrap()).collect()
    }

    pub fn load_next_line(&mut self) {
        let mut line = String::new();
        self.reader.read_line(&mut line).unwrap();

        self.tokens = line
            .split_whitespace()
            .map(|tok| tok.to_string())
            .collect::<Vec<String>>();
        self.index = 0;
    }
}

fn temp(hot: i32, cold: i32, time: i32) -> f64 {
    let sum = (time + 1) / 2 * hot + (time / 2) * cold;
    (sum as f64) / (time as f64)
}

fn solve(hot: i32, cold: i32, wanted: f64) -> i32 {
    let mut time = 1;
    let mut diff = (temp(hot, cold, time) - wanted).abs();

    let mid = temp(hot, cold, 2);
    if (mid - wanted).abs() < diff {
        time = 2;
        diff = (mid - wanted).abs();
    }

    let mut i = 3;
    loop {
        let curr = temp(hot, cold, i);
        if (curr - wanted).abs() < diff {
            time = i;
            diff = (curr - wanted).abs();
        } else if i > 1000 {
            break;
        }
        i += 2;
    }

    time
}

fn main() {
    let mut reader = TokenReader::new();
    let tests = reader.next::<i32>();

    for _ in 0..tests {
        let hot = reader.next::<i32>();
        let cold = reader.next::<i32>();
        let wanted = reader.next::<f64>();

        let res = solve(hot, cold, wanted);
        println!("{}", res);
    }
}


use std::fmt::Debug;
use std::str::FromStr;

pub struct TokenReader {
    reader: std::io::Stdin,
    tokens: Vec<String>,
    index: usize,
}

impl TokenReader {
    fn new() -> Self {
        TokenReader {
            reader: std::io::stdin(),
            tokens: Vec::new(),
            index: 0,
        }
    }

    pub fn next<T>(&mut self) -> T
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index += 1;
        self.tokens[self.index - 1].parse().unwrap()
    }

    pub fn vector<T>(&mut self) -> Vec<T>
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index = self.tokens.len();
        self.tokens.iter().map(|tok| tok.parse().unwrap()).collect()
    }

    pub fn load_next_line(&mut self) {
        let mut line = String::new();
        self.reader.read_line(&mut line).unwrap();

        self.tokens = line
            .split_whitespace()
            .map(|tok| tok.to_string())
            .collect::<Vec<String>>();
        self.index = 0;
    }
}

fn temp(hot: i32, cold: i32, time: i32) -> f64 {
    let sum = (time + 1) / 2 * hot + (time / 2) * cold;
    (sum as f64) / (time as f64)
}

fn solve(hot: i32, cold: i32, wanted: f64) -> i32 {
    let mut diff = std::f64::MAX;
    let mut time = 1;

    let a = (hot as f64) / wanted;
    let b = (cold as f64) / wanted;
    let mid: i32 = if (a + b) > 2.0 { (a / (2.0 - a - b)) as i32 } else { 2 };

    for t in (mid - 100)..(mid + 100) {
        if t < 1 {
            continue;
        }
        let curr = temp(hot, cold, t);
        if (wanted - curr).abs() < diff {
            diff = (wanted - curr).abs();
            time = t;
        }
    }
    time
}

fn main() {
    let mut reader = TokenReader::new();
    let tests = reader.next::<i32>();

    for _ in 0..tests {
        let hot = reader.next::<i32>();
        let cold = reader.next::<i32>();
        let wanted = reader.next::<f64>();

        let res = solve(hot, cold, wanted);
        println!("{}", res);
    }
}


use std::fmt::Debug;
use std::str::FromStr;

pub struct TokenReader {
    reader: std::io::Stdin,
    tokens: Vec<String>,
    index: usize,
}

impl TokenReader {
    fn new() -> Self {
        TokenReader {
            reader: std::io::stdin(),
            tokens: Vec::new(),
            index: 0,
        }
    }

    pub fn next<T>(&mut self) -> T
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index += 1;
        self.tokens[self.index - 1].parse().unwrap()
    }

    pub fn vector<T>(&mut self) -> Vec<T>
    where
        T: FromStr,
        T::Err: Debug,
    {
        if self.index >= self.tokens.len() {
            self.load_next_line();
        }
        self.index = self.tokens.len();
        self.tokens.iter().map(|tok| tok.parse().unwrap()).collect()
    }

    pub fn load_next_line(&mut self) {
        let mut line = String::new();
        self.reader.read_line(&mut line).unwrap();

        self.tokens = line
            .split_whitespace()
            .map(|tok| tok.to_string())
            .collect::<Vec<String>>();
        self.index = 0;
    }
}

fn temp(hot: i32, cold: i32, time: i32) -> f64 {
    let sum = (time + 1) / 2 * hot + (time / 2) * cold;
    (sum as f64) / (time as f64)
}

fn solve(hot: i32, cold: i32, wanted: f64) -> i32 {
    let mut diff = std::f64::MAX;
    let mut time = 1;

    let div = (2.0 * wanted) as i32 - hot - cold;
    let mid: i32 = if div != 0 { hot / div } else { 50 };

    for t in (mid - 10000)..(mid + 10000) {
        if t < 1 {
            continue;
        }
        let curr = temp(hot, cold, t);
        if (wanted - curr).abs() < diff {
            diff = (wanted - curr).abs();
            time = t;
        }
    }
    time
}

fn main() {
    let mut reader = TokenReader::new();
    let tests = reader.next::<i32>();

    for _ in 0..tests {
        let hot = reader.next::<i32>();
        let cold = reader.next::<i32>();
        let wanted = reader.next::<f64>();

        let res = solve(hot, cold, wanted);
        println!("{}", res);
    }
}


use std::io::*;

fn main() {
    let mut s: String = String::new();
    std::io::stdin().read_to_string(&mut s).ok();
    let mut itr = s.trim().split_whitespace();
    let t: usize = itr.next().unwrap().parse().unwrap();
    let mut out = Vec::new();
    for _ in 0..t {
        let h: i64 = itr.next().unwrap().parse().unwrap();
        let c: i64 = itr.next().unwrap().parse().unwrap();
        let t: i64 = itr.next().unwrap().parse().unwrap();
        if t == h {
            writeln!(out, "1").ok();
        } else if t <= (h + c) / 2 {
            writeln!(out, "2").ok();
        } else {
            // a_i = ((h + c) * (i - 1) + h) / (i * 2 - 1)

            let mut l = 1;
            let mut r = 1000000;
            while r - l > 1 {
                let mid = (l + r) >> 1;

                // (h + c) * (i - 1) + h > t * (x * 2 - 1)
                if (h + c) * (mid - 1) + h > t * (mid * 2 - 1) {
                    l = mid;
                } else {
                    r = mid;
                }
            }

            if 2 * t * (2 * l - 1) * (2 * l + 1)
                < ((h + c) * (l - 1) + h) * (2 * l + 1) + (l * c + (l + 1) * h) * (2 * l - 1)
            {
                writeln!(out, "{}", r + r - 1).ok();
            } else {
                writeln!(out, "{}", l + l - 1).ok();
            }
        }
    }
    stdout().write_all(&out).unwrap();
}


use std::io::*;

fn main() {
    let mut s: String = String::new();
    std::io::stdin().read_to_string(&mut s).ok();
    let mut itr = s.trim().split_whitespace();
    let t: usize = itr.next().unwrap().parse().unwrap();
    let mut out = Vec::new();
    for _ in 0..t {
        let h: i64 = itr.next().unwrap().parse().unwrap();
        let c: i64 = itr.next().unwrap().parse().unwrap();
        let t: i64 = itr.next().unwrap().parse().unwrap();
        if t >= h {
            writeln!(out, "1").ok();
        } else if t <= (h + c) / 2 {
            writeln!(out, "2").ok();
        } else {
            // a_i = ((h + c) * (i - 1) + h) / (i * 2 - 1)

            let mut l = 1;
            let mut r = 1000000;
            while r - l > 1 {
                let mid = (l + r) >> 1;

                // (h + c) * (i - 1) + h > t * (x * 2 - 1)
                if (h + c) * (mid - 1) + h > t * (mid * 2 - 1) {
                    l = mid;
                } else {
                    r = mid;
                }
            }

            if (h + c) * (l - 1) + h - t * (l * 2 - 1) > (h + c) * (r - 1) + h - t * (r * 2 - 1) {
                writeln!(out, "{}", r + r - 1).ok();
            } else {
                writeln!(out, "{}", l + l - 1).ok();
            }
        }
    }
    stdout().write_all(&out).unwrap();
}


use std::io::*;

fn check(x: f64, h: f64, c: f64) -> f64 {
    return ((h + c) * (x - 1.0) + h) / (x * 2.0 - 1.0);
}

fn main() {
    let mut s: String = String::new();
    std::io::stdin().read_to_string(&mut s).ok();
    let mut itr = s.trim().split_whitespace();
    let t: usize = itr.next().unwrap().parse().unwrap();
    let mut out = Vec::new();
    for _ in 0..t {
        let h: f64 = itr.next().unwrap().parse().unwrap();
        let c: f64 = itr.next().unwrap().parse().unwrap();
        let t: f64 = itr.next().unwrap().parse().unwrap();
        if t == h {
            writeln!(out, "1").ok();
        } else if t == (h + c) / 2.0 {
            writeln!(out, "2").ok();
        } else {
            // a_i = ((h + c) * (i - 1) + h) / (i * 2 - 1)
            // 単調減少
            let mut l = 1;
            let mut r = 1000000;
            for _ in 0..1000 {
                let mid = ((l + r) >> 1) as f64;
                if check(mid, h, c) > t {
                    l = mid as u64;
                } else {
                    r = mid as u64;
                }
            }

            if (check(l as f64, h, c) - t).abs() > (check(r as f64, h, c) - t).abs() {
                writeln!(out, "{}", r + r - 1).ok();
            } else {
                writeln!(out, "{}", l + l - 1).ok();
            }
        }
    }
    stdout().write_all(&out).unwrap();
}


use std::io::*;

fn check(x: f64, h: f64, c: f64) -> f64 {
    return ((h + c) * (x - 1.0) + h) / (x * 2.0 - 1.0);
}

fn main() {
    let mut s: String = String::new();
    std::io::stdin().read_to_string(&mut s).ok();
    let mut itr = s.trim().split_whitespace();
    let t: usize = itr.next().unwrap().parse().unwrap();
    let mut out = Vec::new();
    for _ in 0..t {
        let h: f64 = itr.next().unwrap().parse().unwrap();
        let c: f64 = itr.next().unwrap().parse().unwrap();
        let t: f64 = itr.next().unwrap().parse().unwrap();
        if t == h {
            writeln!(out, "1").ok();
        } else if t == (h + c) / 2.0 {
            writeln!(out, "2").ok();
        } else {
            // a_i = ((h + c) * (i - 1) + h) / (i * 2 - 1)
            let mut l = 1;
            let mut r = 1100000;
            for _ in 0..3000 {
                let mid = ((l + r) >> 1) as f64;
                if check(mid, h, c) > t {
                    l = mid as u64;
                } else {
                    r = mid as u64;
                }
            }

            let lv = (check(l as f64, h, c) - t).abs();
            let rv = (check(r as f64, h, c) - t).abs();
            let mut min = lv;
            let mean = (h + c) / 2.0;
            if min > rv {
                min = rv;
            }
            if min > h - t && h - t < (mean - t).abs() {
                writeln!(out, "{}", 1).ok();
                continue;
            }
            if min > (mean - t).abs() && h - t > (mean - t).abs() {
                writeln!(out, "{}", 2).ok();
                continue;
            }

            if lv > rv {
                writeln!(out, "{}", r + r - 1).ok();
            } else {
                writeln!(out, "{}", l + l - 1).ok();
            }
        }
    }
    stdout().write_all(&out).unwrap();
}