There are two infinite sources of water:  hot water of temperature $$$h$$$;  cold water of temperature $$$c$$$ ($$$c < h$$$). You perform the following procedure of alternating moves:  take one cup of the hot water and pour it into an infinitely deep barrel;  take one cup of the cold water and pour it into an infinitely deep barrel;  take one cup of the hot water $$$\dots$$$  and so on $$$\dots$$$ Note that you always start with the cup of hot water.The barrel is initially empty. You have to pour at least one cup into the barrel. The water temperature in the barrel is an average of the temperatures of the poured cups.You want to achieve a temperature as close as possible to $$$t$$$. So if the temperature in the barrel is $$$t_b$$$, then the absolute difference of $$$t_b$$$ and $$$t$$$ ($$$|t_b - t|$$$) should be as small as possible.How many cups should you pour into the barrel, so that the temperature in it is as close as possible to $$$t$$$? If there are multiple answers with the minimum absolute difference, then print the smallest of them.

The first line contains a single integer $$$T$$$ ($$$1 \le T \le 3 \cdot 10^4$$$) — the number of testcases. Each of the next $$$T$$$ lines contains three integers $$$h$$$, $$$c$$$ and $$$t$$$ ($$$1 \le c < h \le 10^6$$$; $$$c \le t \le h$$$) — the temperature of the hot water, the temperature of the cold water and the desired temperature in the barrel.

For each testcase print a single positive integer — the minimum number of cups required to be poured into the barrel to achieve the closest temperature to $$$t$$$.

NoteIn the first testcase the temperature after $$$2$$$ poured cups: $$$1$$$ hot and $$$1$$$ cold is exactly $$$20$$$. So that is the closest we can achieve.In the second testcase the temperature after $$$7$$$ poured cups: $$$4$$$ hot and $$$3$$$ cold is about $$$29.857$$$. Pouring more water won't get us closer to $$$t$$$ than that.In the third testcase the temperature after $$$1$$$ poured cup: $$$1$$$ hot is $$$18$$$. That's exactly equal to $$$t$$$.

package main

import (
	"bufio"
	"fmt"
	"os"
)

func readInt(bytes []byte, from int, val *int) int {
	i := from
	sign := 1
	if bytes[i] == '-' {
		sign = -1
		i++
	}
	tmp := 0
	for i < len(bytes) && bytes[i] >= '0' && bytes[i] <= '9' {
		tmp = tmp*10 + int(bytes[i]-'0')
		i++
	}
	*val = tmp * sign
	return i
}

func readNum(reader *bufio.Reader) (a int) {
	bs, _ := reader.ReadBytes('\n')
	readInt(bs, 0, &a)
	return
}

func readTwoNums(reader *bufio.Reader) (a int, b int) {
	res := readNNums(reader, 2)
	a, b = res[0], res[1]
	return
}

func readThreeNums(reader *bufio.Reader) (a int, b int, c int) {
	res := readNNums(reader, 3)
	a, b, c = res[0], res[1], res[2]
	return
}

func readNNums(reader *bufio.Reader, n int) []int {
	res := make([]int, n)
	x := 0
	bs, _ := reader.ReadBytes('\n')
	for i := 0; i < n; i++ {
		for x < len(bs) && (bs[x] < '0' || bs[x] > '9') && bs[x] != '-' {
			x++
		}
		x = readInt(bs, x, &res[i])
	}
	return res
}

func readUint64(bytes []byte, from int, val *uint64) int {
	i := from

	var tmp uint64
	for i < len(bytes) && bytes[i] >= '0' && bytes[i] <= '9' {
		tmp = tmp*10 + uint64(bytes[i]-'0')
		i++
	}
	*val = tmp

	return i
}

func main() {
	reader := bufio.NewReader(os.Stdin)

	tc := readNum(reader)

	for tc > 0 {
		tc--
		H, C, T := readThreeNums(reader)

		fmt.Println(solve(H, C, T))
	}
}

func solve(h, c, t int) int64 {

	if h <= t {
		return 1
	}

	if 2*t <= h+c {
		return 2
	}

	a := int64(h - t)
	b := int64(2*t - c - h)
	k := int64(2*(a/b)) + 1
	val1 := abs(k/2*int64(c) + (k+1)/2*int64(h) - int64(t)*k)
	val2 := abs((k+2)/2*int64(c) + (k+3)/2*int64(h) - int64(t)*(k+2))
	if val1*(k+2) <= val2*k {
		return k
	}
	return k + 2
}

func abs(num int64) int64 {
	if num < 0 {
		return -num
	}
	return num
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)

const (
	mod = int64(1e9 + 7)
)

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	t := 1
	fmt.Fscanf(in, "%d\n", &t)
	for tt := 0; tt < t; tt++ {
		h, c, t := int64(0), int64(0), int64(0)
		fmt.Fscanf(in, "%d %d %d\n", &h, &c, &t)
		ans := int64(0)
		if (h + c) >= t*2 {
			ans = 2
		} else if t >= h {
			ans = 1
		} else {
			ans1 := (h - t) / (2*t - h - c)
			if ans1 < 0 {
				ans1 = 0
			}
			ans2 := ans1 + 1
			diff1 := math.Abs(float64(t)*float64(2*ans1+1) - (float64(ans1)*float64(h+c) + float64(h)))
			diff2 := math.Abs(float64(t)*float64(2*ans2+1) - (float64(ans2)*float64(h+c) + float64(h)))
			if diff1*float64(2*ans2+1) <= diff2*float64(2*ans1+1) {
				ans = ans1*2 + 1
			} else {
				ans = ans2*2 + 1
			}
			// }
			// if ans1 > 0 {
			// 	ans3 := ans1 - 1
			// 	diff3 := math.Abs(float64(t) - (float64(ans3)*float64(h+c)+float64(h))/float64(2*ans3+1))
			// 	//fmt.Println(diff1, diff2, diff3, ans1, ans2, ans3)
			// 	if diff3 <= curBest {
			// 		ans = ans3*2 + 1
			// 		curBest = diff3
			// 	}
			// }
			// diff4 := math.Abs(float64(t) - float64(h+c)/2)
			// if ans > 2 && diff4 <= curBest {
			// 	curBest = diff4
			// 	ans = 2
			// }
		}
		fmt.Fprintf(out, "%d\n", ans)
	}
	return
}

package main

import (
	"fmt"
	"math"
)

func solve() {
	var t int
	fmt.Scanf("%d\n", &t)
	// t = 1
	for i := 0; i < t; i++ {
		var h, c, t int
		fmt.Scanf("%d %d %d\n", &h, &c, &t)
		var res int
		if h + c >= 2 * t {
			res = 2
		} else {
			var res2 float64 = float64(t - h) / float64(h + c - 2 * t)
			if res2 - math.Floor(res2) == 0.5 {
				res2 = math.Ceil(res2);
			} else {
				res2 = math.Floor(res2)
			}
			dif1 := math.Abs(float64(t) - (float64(h) * (res2 + 1) + float64(c) * res2) / (res2 * 2 + 1))
			dif2 := math.Abs(float64(t) - (float64(h) * (res2 + 2) + float64(c) * (res2 + 1)) / ((res2 + 1) * 2 + 1))
			res = int(res2)
			if (dif1 > dif2) {
				res++
			}
			res = res * 2 + 1
		}
		fmt.Printf("%d\n", res)
	}
}

func main() {
	solve()
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int64
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt64_3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		fmt.Println(1)
		return
	}

	// ターゲットが平均値以下のときは2回
	if h+c >= 2*t {
		fmt.Println(2)
		return
	}

	a := tyokuzen(h, c, t)
	// b := tyokugo(h, c, t)
	b := a + 1
	ct := t * (2*a + 1) * (2*b + 1)
	A := (2*b + 1) * ((a+1)*h + a*c)
	B := (2*a + 1) * ((b+1)*h + b*c)
	if A-ct <= ct-B {
		fmt.Println(2*a + 1)
	} else {
		fmt.Println(2*b + 1)
	}
}

func tyokuzen(h, c, t int64) int64 {
	ok := BinarySearch(0, 1000000000, func(mid int64) bool {
		return (mid+1)*h+mid*c > (2*mid+1)*t
	})

	return ok
}

// func tyokugo(h, c, t int64) int64 {
// 	ok := BinarySearch(100000, 0, func(mid int64) bool {
// 		return (mid+1)*h+mid*c < (2*mid+1)*t
// 	})

// 	return ok
// }

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	for int(math.Abs(float64(ok-ng))) > 1 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int64
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt64_3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		fmt.Println(1)
		return
	}

	// ターゲットが平均値以下のときは2回
	if h+c >= 2*t {
		fmt.Println(2)
		return
	}

	a := tyokuzen(h, c, t)
	// b := tyokugo(h, c, t)
	b := a + 1
	ct := t * (2*a + 1) * (2*b + 1)
	A := (2*b + 1) * ((a+1)*h + a*c)
	B := (2*a + 1) * ((b+1)*h + b*c)
	if A-ct <= ct-B {
		fmt.Println(2*a + 1)
	} else {
		fmt.Println(2*b + 1)
	}
}

func tyokuzen(h, c, t int64) int64 {
	ok := BinarySearch(0, 500000, func(mid int64) bool {
		return (mid+1)*h+mid*c > (2*mid+1)*t
	})

	return ok
}

// func tyokugo(h, c, t int64) int64 {
// 	ok := BinarySearch(100000, 0, func(mid int64) bool {
// 		return (mid+1)*h+mid*c < (2*mid+1)*t
// 	})

// 	return ok
// }

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	for int(math.Abs(float64(ok-ng))) > 1 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)

var nTest int
var h, c, t int64

func gcd(a, b int) int {
	for b != 0 {
		t := b
		b = a % b
		a = t
	}
	return a
}

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	fmt.Fscan(in, &nTest)

	for i := 0; i < nTest; i++ {
		fmt.Fscan(in, &h, &c, &t)

		if t <= (h+c)/2 {
			fmt.Fprintln(out, 2)
			continue
		}

		k := ((h - t) / (2*t - h - c))

		v1 := (k+1)*h + k*c
		m1 := 2*k + 1
		v2 := (k+2)*h + (k+1)*c
		m2 := 2*(k+1) + 1

		mm := m1 * m2
		V1 := v1 * m2
		V2 := v2 * m1
		T := t * mm

		// fmt.Printf("%18f %18f %18f\n", V1, V2, T)
		// fmt.Println("v1-t=", V1-T, "v2-t=", V2-T)
		if math.Abs(float64(V1-T)) <= math.Abs(float64(V2-T)) {
			fmt.Fprintln(out, k*2+1)
		} else {
			fmt.Fprintln(out, (k+1)*2+1)
		}
	}
	out.Flush()
}

package main

import (
	"bufio"
	. "fmt"
	"os"
)

// github.com/EndlessCheng/codeforces-go
func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()

	var t, a, b, c int64
	for Fscan(in, &t); t > 0; t-- {
		Fscan(in, &c, &a, &b)
		d := 2*b - a - c
		if d <= 0 {
			Fprintln(out, 2)
			continue
		}
		x := (c - b) / d
		p, q := a*x+c*(x+1), 2*x+1
		v, w := a*(x+1)+c*(x+2), 2*x+3
		if p*w+q*v <= 2*b*q*w {
			Fprintln(out, 2*x+1)
		} else {
			Fprintln(out, 2*x+3)
		}
	}
}

package main

import (
	"bufio"
	"fmt"
	"os"
)

func abs(x int64) int64 {
	if x >= 0 {
		return x
	}
	return -x
}

func main() {
	in, out := bufio.NewReader(os.Stdin), bufio.NewWriter(os.Stdout)
	defer out.Flush()

	scan := func(a ...interface{}) {
		fmt.Fscan(in, a...)
	}
	println := func(a ...interface{}) {
		fmt.Fprintln(out, a...)
	}

	var T int
	for scan(&T); T > 0; T-- {
		var h, c, t int64
		scan(&h, &c, &t)
		var n int64
		if 2*t <= h+c {
			n = 2
		} else {
			x := (h - t) / (2*t - h - c)
			if abs(((x+2)*h+(x+1)*c)-(2*x+3)*t)*(2*x+1) < abs(((x+1)*h+x*c)-(2*x+1)*t)*(2*x+3) {
				x++
			}
			n = 2*x + 1
		}
		println(n)
	}
}

package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	reader := bufio.NewReader(os.Stdin)

	var n int

	fmt.Fscanf(reader, "%d\n", &n)

	var h, c, t int64
	for ; n > 0; n-- {
		fmt.Fscanf(reader, "%d %d %d\n", &h, &c, &t)
		if h == t {
			fmt.Println(1)
			continue
		}

		if h+c >= t+t {
			fmt.Println(2)
			continue
		}

		x := (h - t) / (t - c + t - h)

		var a1, a2 int64
		//b1 := (h+c)/2 + (h-c)/(4*x+2)
		a1 = (2*x+1)*(h+c) + (h - c) - (4*x+2)*t
		if a1 < 0 {
			a1 = 0 - a1
		}

		//b2 := (h+c)/2 + (h-c)/(4*x+6)
		a2 = (2*x+3)*(h+c) + (h - c) - (4*x+6)*t
		if a2 < 0 {
			a2 = 0 - a2
		}

		if a1*(4*x+6) <= a2*(4*x+2) {
			fmt.Println(2*x + 1)
		} else {
			fmt.Println(2*x + 3)
		}
	}
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)

var h, c, t float64

func main() {
	reader := bufio.NewReader(os.Stdin)

	var n int

	fmt.Fscanf(reader, "%d\n", &n)

	for ; n > 0; n-- {
		fmt.Fscanf(reader, "%f %f %f\n", &h, &c, &t)
		if h == t {
			fmt.Println(1)
			continue
		}

		if h+c >= t+t {
			fmt.Println(2)
			continue
		}

		left, right := 0, 1<<30
		for left+3 <= right {
			lmid := left + (right-left)/3
			rmid := right - (right-left)/3
			if diff(lmid) > diff(rmid) {
				left = lmid
			} else {
				right = rmid
			}
		}

		ans := right
		for ; left <= right; right-- {
			if diff(ans) >= diff(right) {
				ans = right
			}
		}

		fmt.Println(2*ans + 1)
	}
}

func diff(x int) float64 {
	xf := float64(x)
	return math.Abs((xf*(h+c-t-t) + h - t) / (2.0*xf + 1.0))
}

package main

import (
	"fmt"
	"bufio"
	"os"
	"math"
)
var fin *bufio.Reader = bufio.NewReader(os.Stdin)
var fout *bufio.Writer = bufio.NewWriter(os.Stdout)
func max(a int, b int) int { if(a > b) { return a } else { return b }}
func main() {
	defer fout.Flush()
	var asdf int
	fmt.Fscan(fin, &asdf)
	for ; asdf > 0; asdf-- {
		var h, c, t float64
		fmt.Fscan(fin, &h, &c, &t)
		ans := 2
		m := (h+c)/2
		best := math.Abs(t-m)
		x := math.Floor((h-m)/(t-m))
		if int(x)%2 == 0 {
			x--;
		}
		if math.Abs(t-m-(h-m)/x) < best && x > 0 {
			best = math.Abs(t-m-(h-m)/x)
			ans = int(x)
		}
		x += 2
		if math.Abs(t-m-(h-m)/x) < best && x > 0 {
			best = math.Abs(t-m-(h-m)/x)
			ans = int(x)
		}
		fmt.Fprintln(fout, ans)
	}
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"math/big"
	"os"
	"strconv"
)

func getScanner(fp *os.File) *bufio.Scanner {
	scanner := bufio.NewScanner(fp)
	scanner.Split(bufio.ScanWords)
	scanner.Buffer(make([]byte, 1000005), 1000005)
	return scanner
}
func getNextString(scanner *bufio.Scanner) string {
	scanner.Scan()
	return scanner.Text()
}
func getNextInt(scanner *bufio.Scanner) int {
	i, _ := strconv.Atoi(getNextString(scanner))
	return i
}
func getNextInt64(scanner *bufio.Scanner) int64 {
	i, _ := strconv.ParseInt(getNextString(scanner), 10, 64)
	return i
}
func getNextUint64(scanner *bufio.Scanner) uint64 {
	i, _ := strconv.ParseUint(getNextString(scanner), 10, 64)
	return i
}
func getNextFloat64(scanner *bufio.Scanner) float64 {
	i, _ := strconv.ParseFloat(getNextString(scanner), 64)
	return i
}
func main() {
	fp := os.Stdin
	wfp := os.Stdout
	cnt := 0
	if os.Getenv("MASPY") == "ますピ" {
		fp, _ = os.Open(os.Getenv("BEET_THE_HARMONY_OF_PERFECT"))
		cnt = 2
	}
	if os.Getenv("MASPYPY") == "ますピッピ" {
		wfp, _ = os.Create(os.Getenv("NGTKANA_IS_GENIUS10"))
	}
	scanner := getScanner(fp)
	writer := bufio.NewWriter(wfp)
	solve(scanner, writer)
	for i := 0; i < cnt; i++ {
		fmt.Fprintln(writer, "-----------------------------------")
		solve(scanner, writer)
	}
	writer.Flush()
}
func solve(scanner *bufio.Scanner, writer *bufio.Writer) {
	t := getNextInt(scanner)
	for i := 0; i < t; i++ {
		testcase(scanner, writer)
	}
}
func testcase(scanner *bufio.Scanner, writer *bufio.Writer) {
	h := getNextInt64(scanner)
	c := getNextInt64(scanner)
	t := getNextInt64(scanner)
	if t*2 <= h+c {
		fmt.Fprintln(writer, 2)
		return
	}
	var l, r int64
	l = 0
	r = math.MaxInt64 >> 1
	for l+1 < r {
		m := l + (r-l)>>1
		bur := big.NewInt(0).Add(mulint(h, m), mulint(c, m-1))
		if bur.Cmp(mulint(t, m*2-1)) == -1 {
			r = m
			continue
		}
		l = m
	}
	bl := mulbint(big.NewInt(r<<1-1), addbint(mulint(h, l), mulint(c, l-1)))
	br := mulbint(big.NewInt(l<<1-1), addbint(mulint(h, r), mulint(c, r-1)))
	tt := mulbint(mulint(l<<1-1, r<<1-1), big.NewInt(t))
	if subbint(tt, bl).Cmp(subbint(br, tt)) == -1 {
		fmt.Fprintln(writer, r<<1-1)
		return
	}
	fmt.Fprintln(writer, l<<1-1)
}

func addint(a, b int64) *big.Int {
	return big.NewInt(0).Add(big.NewInt(a), big.NewInt(b))
}
func subint(a, b int64) *big.Int {
	return big.NewInt(0).Sub(big.NewInt(a), big.NewInt(b))
}
func mulint(a, b int64) *big.Int {
	return big.NewInt(0).Mul(big.NewInt(a), big.NewInt(b))
}
func addbint(a, b *big.Int) *big.Int {
	return big.NewInt(0).Add(a, b)
}
func subbint(a, b *big.Int) *big.Int {
	return big.NewInt(0).Sub(a, b)
}
func mulbint(a, b *big.Int) *big.Int {
	return big.NewInt(0).Mul(a, b)
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)

func readInt(bytes []byte, from int, val *int) int {
	i := from
	sign := 1
	if bytes[i] == '-' {
		sign = -1
		i++
	}
	tmp := 0
	for i < len(bytes) && bytes[i] >= '0' && bytes[i] <= '9' {
		tmp = tmp*10 + int(bytes[i]-'0')
		i++
	}
	*val = tmp * sign
	return i
}

func readNum(reader *bufio.Reader) (a int) {
	bs, _ := reader.ReadBytes('\n')
	readInt(bs, 0, &a)
	return
}

func readTwoNums(reader *bufio.Reader) (a int, b int) {
	res := readNNums(reader, 2)
	a, b = res[0], res[1]
	return
}

func readThreeNums(reader *bufio.Reader) (a int, b int, c int) {
	res := readNNums(reader, 3)
	a, b, c = res[0], res[1], res[2]
	return
}

func readNNums(reader *bufio.Reader, n int) []int {
	res := make([]int, n)
	x := 0
	bs, _ := reader.ReadBytes('\n')
	for i := 0; i < n; i++ {
		for x < len(bs) && (bs[x] < '0' || bs[x] > '9') && bs[x] != '-' {
			x++
		}
		x = readInt(bs, x, &res[i])
	}
	return res
}

func readUint64(bytes []byte, from int, val *uint64) int {
	i := from

	var tmp uint64
	for i < len(bytes) && bytes[i] >= '0' && bytes[i] <= '9' {
		tmp = tmp*10 + uint64(bytes[i]-'0')
		i++
	}
	*val = tmp

	return i
}

func main() {
	reader := bufio.NewReader(os.Stdin)

	tc := readNum(reader)

	for tc > 0 {
		tc--
		H, C, T := readThreeNums(reader)

		fmt.Println(solve(H, C, T))
	}
}

func solve(h, c, t int) int64 {
	if h <= t {
		return 1
	}

	if 2*t <= h+c {
		return 2
	}

	calc := func(n int64) float64 {
		y := float64(2*n - 1)
		x := float64(n*int64(h)) / y
		z := float64((n-1)*int64(c)) / y
		return x + z
	}

	var left, right int64 = 2, math.MaxInt32

	for left < right {
		mid := (left + right) / 2
		x := calc(mid)
		if x <= float64(t) {
			right = mid
		} else {
			left = mid + 1
		}
	}
	x := calc(right - 1)
	y := calc(right)
	if math.Abs(x-float64(t)) <= math.Abs(y-float64(t)) {
		right--
	}
	return 2*right - 1
}

func solve1(h, c, t int) int64 {

	if h <= t {
		return 1
	}

	if 2*t <= h+c {
		return 2
	}

	a := int64(h - t)
	b := int64(2*t - c - h)
	k := int64(2*(a/b)) + 1
	val1 := abs(k/2*int64(c) + (k+1)/2*int64(h) - int64(t)*k)
	val2 := abs((k+2)/2*int64(c) + (k+3)/2*int64(h) - int64(t)*(k+2))
	if val1*(k+2) <= val2*k {
		return k
	}
	return k + 2
}

func abs(num int64) int64 {
	if num < 0 {
		return -num
	}
	return num
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)

func readInt(bytes []byte, from int, val *int) int {
	i := from
	sign := 1
	if bytes[i] == '-' {
		sign = -1
		i++
	}
	tmp := 0
	for i < len(bytes) && bytes[i] >= '0' && bytes[i] <= '9' {
		tmp = tmp*10 + int(bytes[i]-'0')
		i++
	}
	*val = tmp * sign
	return i
}

func readNum(reader *bufio.Reader) (a int) {
	bs, _ := reader.ReadBytes('\n')
	readInt(bs, 0, &a)
	return
}

func readTwoNums(reader *bufio.Reader) (a int, b int) {
	res := readNNums(reader, 2)
	a, b = res[0], res[1]
	return
}

func readThreeNums(reader *bufio.Reader) (a int, b int, c int) {
	res := readNNums(reader, 3)
	a, b, c = res[0], res[1], res[2]
	return
}

func readNNums(reader *bufio.Reader, n int) []int {
	res := make([]int, n)
	x := 0
	bs, _ := reader.ReadBytes('\n')
	for i := 0; i < n; i++ {
		for x < len(bs) && (bs[x] < '0' || bs[x] > '9') && bs[x] != '-' {
			x++
		}
		x = readInt(bs, x, &res[i])
	}
	return res
}

func readUint64(bytes []byte, from int, val *uint64) int {
	i := from

	var tmp uint64
	for i < len(bytes) && bytes[i] >= '0' && bytes[i] <= '9' {
		tmp = tmp*10 + uint64(bytes[i]-'0')
		i++
	}
	*val = tmp

	return i
}

func main() {
	reader := bufio.NewReader(os.Stdin)

	tc := readNum(reader)

	for tc > 0 {
		tc--
		H, C, T := readThreeNums(reader)

		fmt.Println(solve(H, C, T))
	}
}

func solve(h, c, t int) int64 {
	if h <= t {
		return 1
	}

	if 2*t <= h+c {
		return 2
	}

	calc := func(n int64) float64 {
		x := n*int64(h) + (n-1)*int64(c)
		return float64(x) / float64(2*n-1)
	}

	var left, right int64 = 3, math.MaxInt32

	for left < right {
		mid := (left + right) / 2
		x := calc(mid)
		if x <= float64(t) {
			right = mid
		} else {
			left = mid + 1
		}
	}
	x := calc(right - 1)
	y := calc(right)
	if math.Abs(x-float64(t)) <= math.Abs(y-float64(t)) {
		right--
	}
	return 2*right - 1
}

func solve1(h, c, t int) int64 {

	if h <= t {
		return 1
	}

	if 2*t <= h+c {
		return 2
	}

	a := int64(h - t)
	b := int64(2*t - c - h)
	k := int64(2*(a/b)) + 1
	val1 := abs(k/2*int64(c) + (k+1)/2*int64(h) - int64(t)*k)
	val2 := abs((k+2)/2*int64(c) + (k+3)/2*int64(h) - int64(t)*(k+2))
	if val1*(k+2) <= val2*k {
		return k
	}
	return k + 2
}

func abs(num int64) int64 {
	if num < 0 {
		return -num
	}
	return num
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)

func readInt(bytes []byte, from int, val *int) int {
	i := from
	sign := 1
	if bytes[i] == '-' {
		sign = -1
		i++
	}
	tmp := 0
	for i < len(bytes) && bytes[i] >= '0' && bytes[i] <= '9' {
		tmp = tmp*10 + int(bytes[i]-'0')
		i++
	}
	*val = tmp * sign
	return i
}

func readNum(reader *bufio.Reader) (a int) {
	bs, _ := reader.ReadBytes('\n')
	readInt(bs, 0, &a)
	return
}

func readTwoNums(reader *bufio.Reader) (a int, b int) {
	res := readNNums(reader, 2)
	a, b = res[0], res[1]
	return
}

func readThreeNums(reader *bufio.Reader) (a int, b int, c int) {
	res := readNNums(reader, 3)
	a, b, c = res[0], res[1], res[2]
	return
}

func readNNums(reader *bufio.Reader, n int) []int {
	res := make([]int, n)
	x := 0
	bs, _ := reader.ReadBytes('\n')
	for i := 0; i < n; i++ {
		for x < len(bs) && (bs[x] < '0' || bs[x] > '9') && bs[x] != '-' {
			x++
		}
		x = readInt(bs, x, &res[i])
	}
	return res
}

func readUint64(bytes []byte, from int, val *uint64) int {
	i := from

	var tmp uint64
	for i < len(bytes) && bytes[i] >= '0' && bytes[i] <= '9' {
		tmp = tmp*10 + uint64(bytes[i]-'0')
		i++
	}
	*val = tmp

	return i
}

func main() {
	reader := bufio.NewReader(os.Stdin)

	tc := readNum(reader)

	for tc > 0 {
		tc--
		H, C, T := readThreeNums(reader)

		fmt.Println(solve(H, C, T))
	}
}

func solve(h, c, t int) int64 {
	if h <= t {
		return 1
	}

	if 2*t <= h+c {
		return 2
	}

	calc := func(n int64) float64 {
		x := n*int64(h) + (n-1)*int64(c)
		return float64(x) / float64(2*n-1)
	}

	var left, right int64 = 2, math.MaxInt32

	for left < right {
		mid := (left + right) / 2
		x := calc(mid)
		if x <= float64(t) {
			right = mid
		} else {
			left = mid + 1
		}
	}
	x := calc(right - 1)
	y := calc(right)
	if math.Abs(x-float64(t)) <= math.Abs(y-float64(t)) {
		right--
	}
	return 2*right - 1
}

func solve1(h, c, t int) int64 {

	if h <= t {
		return 1
	}

	if 2*t <= h+c {
		return 2
	}

	a := int64(h - t)
	b := int64(2*t - c - h)
	k := int64(2*(a/b)) + 1
	val1 := abs(k/2*int64(c) + (k+1)/2*int64(h) - int64(t)*k)
	val2 := abs((k+2)/2*int64(c) + (k+3)/2*int64(h) - int64(t)*(k+2))
	if val1*(k+2) <= val2*k {
		return k
	}
	return k + 2
}

func abs(num int64) int64 {
	if num < 0 {
		return -num
	}
	return num
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)

func readInt(bytes []byte, from int, val *int) int {
	i := from
	sign := 1
	if bytes[i] == '-' {
		sign = -1
		i++
	}
	tmp := 0
	for i < len(bytes) && bytes[i] >= '0' && bytes[i] <= '9' {
		tmp = tmp*10 + int(bytes[i]-'0')
		i++
	}
	*val = tmp * sign
	return i
}

func readNum(reader *bufio.Reader) (a int) {
	bs, _ := reader.ReadBytes('\n')
	readInt(bs, 0, &a)
	return
}

func readTwoNums(reader *bufio.Reader) (a int, b int) {
	res := readNNums(reader, 2)
	a, b = res[0], res[1]
	return
}

func readThreeNums(reader *bufio.Reader) (a int, b int, c int) {
	res := readNNums(reader, 3)
	a, b, c = res[0], res[1], res[2]
	return
}

func readNNums(reader *bufio.Reader, n int) []int {
	res := make([]int, n)
	x := 0
	bs, _ := reader.ReadBytes('\n')
	for i := 0; i < n; i++ {
		for x < len(bs) && (bs[x] < '0' || bs[x] > '9') && bs[x] != '-' {
			x++
		}
		x = readInt(bs, x, &res[i])
	}
	return res
}

func readUint64(bytes []byte, from int, val *uint64) int {
	i := from

	var tmp uint64
	for i < len(bytes) && bytes[i] >= '0' && bytes[i] <= '9' {
		tmp = tmp*10 + uint64(bytes[i]-'0')
		i++
	}
	*val = tmp

	return i
}

func main() {
	reader := bufio.NewReader(os.Stdin)

	tc := readNum(reader)

	for tc > 0 {
		tc--
		H, C, T := readThreeNums(reader)

		fmt.Println(solve(H, C, T))
	}
}

func solve(h, c, t int) int64 {

	if h <= t {
		return 1
	}

	if 2*t <= h+c {
		return 2
	}

	H, C, T := int64(h), int64(c), float64(t)

	// else if has to be (n * H + (n - 1)  * C) / (2 * n - 1)
	calc := func(n int64) float64 {
		x := n*H + (n-1)*C
		return float64(x) / float64(2*n-1)
	}

	D := calc(2)

	if D < T {
		return 3
	}

	var left, right int64 = 3, math.MaxInt32

	for left < right {
		mid := left + (right-left)/2
		x := calc(mid)

		if x < T || math.Abs(x-T) < 1e-8 {
			right = mid
		} else {
			left = mid + 1
		}
	}

	return 2*right - 1
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)

const (
	mod = int64(1e9 + 7)
)

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	t := 1
	fmt.Fscanf(in, "%d\n", &t)
	for tt := 0; tt < t; tt++ {
		h, c, t := int64(0), int64(0), int64(0)
		fmt.Fscanf(in, "%d %d %d\n", &h, &c, &t)
		ans := int64(0)
		if (h + c) >= t*2 {
			ans = 2
		} else if t >= h {
			ans = 1
		} else {
			ans1 := (h - t) / (2*t - h - c)
			if ans1 < 0 {
				ans1 = 0
			}
			ans2 := ans1 + 1
			curBest := float64(0)
			diff1 := math.Abs(float64(t) - (float64(ans1)*float64(h+c)+float64(h))/float64(2*ans1+1))
			diff2 := math.Abs(float64(t) - (float64(ans2)*float64(h+c)+float64(h))/float64(2*ans2+1))
			if diff1 <= diff2 {
				ans = ans1*2 + 1
				curBest = diff1
			} else {
				ans = ans2*2 + 1
				curBest = diff2
			}
			if ans1 > 0 {
				ans3 := ans1 - 1
				diff3 := math.Abs(float64(t) - (float64(ans3)*float64(h+c)+float64(h))/float64(2*ans3+1))
				//fmt.Println(diff1, diff2, diff3, ans1, ans2, ans3)
				if diff3 <= diff1 {
					ans = ans3*2 + 1
					curBest = diff3
				}
			}
			diff4 := math.Abs(float64(t) - float64(h+c)/2)
			if ans > 2 && diff4 <= curBest {
				curBest = diff4
				ans = 2
			}
		}
		fmt.Fprintf(out, "%d\n", ans)
	}
	return
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)

const (
	mod = int64(1e9 + 7)
)

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	t := 1
	fmt.Fscanf(in, "%d\n", &t)
	for tt := 0; tt < t; tt++ {
		h, c, t := int64(0), int64(0), int64(0)
		fmt.Fscanf(in, "%d %d %d\n", &h, &c, &t)
		ans := int64(0)
		if (h + c) >= t*2 {
			ans = 2
		} else if t >= h {
			ans = 1
		} else {
			ans1 := (h - t) / (2*t - h - c)
			if ans1 < 0 {
				ans1 = 0
			}
			ans2 := ans1 + 1
			curBest := float64(0)
			diff1 := math.Abs(float64(t) - (float64(ans1)*float64(h+c)+float64(h))/float64(2*ans1+1))
			diff2 := math.Abs(float64(t) - (float64(ans2)*float64(h+c)+float64(h))/float64(2*ans2+1))
			if diff1 <= diff2 {
				ans = ans1*2 + 1
				curBest = diff1
			} else {
				ans = ans2*2 + 1
				curBest = diff2
			}
			if ans1 > 0 {
				ans3 := ans1 - 1
				diff3 := math.Abs(float64(t) - (float64(ans3)*float64(h+c)+float64(h))/float64(2*ans3+1))
				//fmt.Println(diff1, diff2, diff3, ans1, ans2, ans3)
				if diff3 <= diff1 {
					ans = ans3*2 + 1
					curBest = diff3
				}
			}
			ans4 := 2
			diff4 := math.Abs(float64(t) - (float64(ans4)*float64(h+c)+float64(h))/float64(2*ans4+1))
			if ans > 2 && diff4 <= curBest {
				curBest = diff4
				ans = 2
			}
		}
		fmt.Fprintf(out, "%d\n", ans)
	}
	return
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)

const (
	mod = int64(1e9 + 7)
)

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	t := 1
	fmt.Fscanf(in, "%d\n", &t)
	for tt := 0; tt < t; tt++ {
		h, c, t := int64(0), int64(0), int64(0)
		fmt.Fscanf(in, "%d %d %d\n", &h, &c, &t)
		ans := int64(0)
		if (h + c) >= t*2 {
			ans = 2
		} else if t >= h {
			ans = 1
		} else {
			ans1 := (h - t) / (2*t - h - c)
			if ans1 < 0 {
				ans1 = 0
			}
			ans2 := ans1 + 1
			curBest := float64(0)
			diff1 := math.Abs(float64(t) - (float64(ans1)*float64(h+c)+float64(h))/float64(2*ans1+1))
			diff2 := math.Abs(float64(t) - (float64(ans2)*float64(h+c)+float64(h))/float64(2*ans2+1))
			if diff1 <= diff2 {
				ans = ans1*2 + 1
				curBest = diff1
			} else {
				ans = ans2*2 + 1
				curBest = diff2
			}
			if ans1 > 0 {
				ans3 := ans1 - 1
				diff3 := math.Abs(float64(t) - (float64(ans3)*float64(h+c)+float64(h))/float64(2*ans3+1))
				//fmt.Println(diff1, diff2, diff3, ans1, ans2, ans3)
				if diff3 <= diff1 && diff3 <= diff2 {
					ans = ans3*2 + 1
					curBest = diff3
				}
			}
			diff4 := math.Abs(float64(t) - float64(h+c)/2)
			if ans > 2 && diff4 <= curBest {
				curBest = diff4
				ans = 2
			}
		}
		fmt.Fprintf(out, "%d\n", ans)
	}
	return
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)

const (
	mod = int64(1e9 + 7)
)

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	t := 1
	fmt.Fscanf(in, "%d\n", &t)
	for tt := 0; tt < t; tt++ {
		h, c, t := int64(0), int64(0), int64(0)
		fmt.Fscanf(in, "%d %d %d\n", &h, &c, &t)
		ans := int64(0)
		if (h + c) >= t*2 {
			ans = 2
		} else if t >= h {
			ans = 1
		} else {
			ans1 := (h - t) / (2*t - h - c)
			if ans1 < 0 {
				ans1 = 0
			}
			ans2 := ans1 + 1
			curBest := float64(0)
			diff1 := math.Abs(float64(t) - (float64(ans1)*float64(h+c)+float64(h))/float64(2*ans1+1))
			diff2 := math.Abs(float64(t) - (float64(ans2)*float64(h+c)+float64(h))/float64(2*ans2+1))
			if diff1 <= diff2 {
				ans = ans1*2 + 1
				curBest = diff1
			} else {
				ans = ans2*2 + 1
				curBest = diff2
			}
			if ans1 > 0 {
				ans3 := ans1 - 1
				diff3 := math.Abs(float64(t) - (float64(ans3)*float64(h+c)+float64(h))/float64(2*ans3+1))
				//fmt.Println(diff1, diff2, diff3, ans1, ans2, ans3)
				if diff3 <= curBest {
					ans = ans3*2 + 1
					curBest = diff3
				}
			}
			diff4 := math.Abs(float64(t) - float64(h+c)/2)
			if ans > 2 && diff4 <= curBest {
				curBest = diff4
				ans = 2
			}
		}
		fmt.Fprintf(out, "%d\n", ans)
	}
	return
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)

const (
	mod = int64(1e9 + 7)
)

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	t := 1
	fmt.Fscanf(in, "%d\n", &t)
	for tt := 0; tt < t; tt++ {
		h, c, t := int64(0), int64(0), int64(0)
		fmt.Fscanf(in, "%d %d %d\n", &h, &c, &t)
		ans := int64(0)
		if (h + c) == t*2 {
			ans = 2
		} else if (h + c) > t*2 {
			ans = 2
		} else if t >= h {
			ans = 1
		} else {
			ans1 := (h - t) / (2*t - h - c)
			if ans1 < 0 {
				ans1 = 0
			}
			ans2 := ans1 + 1
			diff1 := math.Abs(float64(t) - float64(ans1*(h+c)+h)/float64(2*ans1+1))
			diff2 := math.Abs(float64(t) - float64(ans2*(h+c)+h)/float64(2*ans2+1))
			fmt.Println(diff1, diff2)
			if diff1 <= diff2 {
				ans = ans1*2 + 1
			} else {
				ans = ans2*2 + 1
			}
		}
		fmt.Fprintf(out, "%d\n", ans)
	}
	return
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)

const (
	mod = int64(1e9 + 7)
)

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	t := 1
	fmt.Fscanf(in, "%d\n", &t)
	for tt := 0; tt < t; tt++ {
		h, c, t := int64(0), int64(0), int64(0)
		fmt.Fscanf(in, "%d %d %d\n", &h, &c, &t)
		ans := int64(0)
		if (h + c) >= t*2 {
			ans = 2
		} else if t >= h {
			ans = 1
		} else {
			ans1 := (h - t) / (2*t - h - c)
			if ans1 < 0 {
				ans1 = 0
			}
			ans2 := ans1 + 1
			diff1 := math.Abs(float64(t) - (float64(ans1)*float64(h+c)+float64(h))/float64(2*ans1+1))
			diff2 := math.Abs(float64(t) - (float64(ans2)*float64(h+c)+float64(h))/float64(2*ans2+1))
			if diff1 <= diff2 {
				ans = ans1*2 + 1
			} else {
				ans = ans2*2 + 1
			}
			diff3 := math.Abs(float64(h+c)/2 - float64(t))
			if diff3 <= diff1 && diff3 <= diff2 && ans > 2 {
				ans = 2
			}
		}
		fmt.Fprintf(out, "%d\n", ans)
	}
	return
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)

const (
	mod = int64(1e9 + 7)
)

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	t := 1
	fmt.Fscanf(in, "%d\n", &t)
	for tt := 0; tt < t; tt++ {
		h, c, t := int64(0), int64(0), int64(0)
		fmt.Fscanf(in, "%d %d %d\n", &h, &c, &t)
		ans := int64(0)
		if (h + c) == t*2 {
			ans = 2
		} else if (h + c) > t*2 {
			ans = 2
		} else if t >= h {
			ans = 1
		} else {
			ans1 := (h - t) / (2*t - h - c)
			if ans1 < 0 {
				ans1 = 0
			}
			ans2 := ans1 + 1
			diff1 := math.Abs(float64(t) - float64(ans1*(h+c)+h)/float64(2*ans1+1))
			diff2 := math.Abs(float64(t) - float64(ans2*(h+c)+h)/float64(2*ans2+1))
			//wtffmt.Println(diff1, diff2)
			if diff1 <= diff2 {
				ans = ans1*2 + 1
			} else {
				ans = ans2*2 + 1
			}
		}
		fmt.Fprintf(out, "%d\n", ans)
	}
	return
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)

const (
	mod = int64(1e9 + 7)
)

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	t := 1
	fmt.Fscanf(in, "%d\n", &t)
	for tt := 0; tt < t; tt++ {
		h, c, t := int64(0), int64(0), int64(0)
		fmt.Fscanf(in, "%d %d %d\n", &h, &c, &t)
		ans := int64(0)
		if (h + c) >= t*2 {
			ans = 2
		} else if t >= h {
			ans = 1
		} else {
			l := int64(1)
			r := int64(999999999)
			for l < r {
				mid := (l + r) / 2
				cur := (float64(mid)*float64(h+c) + float64(h)) / float64(2*mid+1)
				//fmt.Println(mid, cur)
				if cur > float64(t) {
					l = mid + 1
				} else {
					r = mid
				}
			}
			ans1 := l - 1
			if ans1 < 0 {
				ans1 = 0
			}
			ans2 := ans1 + 1
			curBest := float64(0)
			diff1 := math.Abs(float64(t) - (float64(ans1)*float64(h+c)+float64(h))/float64(2*ans1+1))
			diff2 := math.Abs(float64(t) - (float64(ans2)*float64(h+c)+float64(h))/float64(2*ans2+1))
			if diff1 <= diff2 {
				ans = ans1*2 + 1
				curBest = diff1
			} else {
				ans = ans2*2 + 1
				curBest = diff2
			}
			if ans1 > 0 {
				ans3 := ans1 - 1
				diff3 := math.Abs(float64(t) - (float64(ans3)*float64(h+c)+float64(h))/float64(2*ans3+1))
				//fmt.Println(diff1, diff2, diff3, ans1, ans2, ans3)
				if diff3 <= diff1 {
					ans = ans3*2 + 1
					curBest = diff3
				}
			}
			diff4 := math.Abs(float64(t) - float64(h+c)/2)
			if ans > 2 && diff4 <= curBest {
				curBest = diff4
				ans = 2
			}
		}
		fmt.Fprintf(out, "%d\n", ans)
	}
	return
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)

const (
	mod = int64(1e9 + 7)
)

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	t := 1
	fmt.Fscanf(in, "%d\n", &t)
	for tt := 0; tt < t; tt++ {
		h, c, t := int64(0), int64(0), int64(0)
		fmt.Fscanf(in, "%d %d %d\n", &h, &c, &t)
		ans := int64(0)
		if (h + c) == t*2 {
			ans = 2
		} else if (h + c) > t*2 {
			ans = 2
		} else {
			ans1 := (t - h) / (h + c - 2*t)
			ans2 := ans1 + 1
			diff1 := math.Abs(float64(t) - float64(ans1*(h+c)+h)/float64(2*ans1+1))
			diff2 := math.Abs(float64(t) - float64(ans2*(h+c)+h)/float64(2*ans2+1))
			if diff1 <= diff2 {
				ans = ans1*2 + 1
			} else {
				ans = ans2*2 + 1
			}
		}
		fmt.Fprintf(out, "%d\n", ans)
	}
	return
}

func maxmin(a, b int) (int, int) {
	if a < b {
		return a, b
	}
	return b, a
}

func gcd(a, b int) int {
	if b == 0 {
		return a
	}
	return gcd(b, a%b)
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)

const (
	mod = int64(1e9 + 7)
)

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	t := 1
	fmt.Fscanf(in, "%d\n", &t)
	for tt := 0; tt < t; tt++ {
		h, c, t := int64(0), int64(0), int64(0)
		fmt.Fscanf(in, "%d %d %d\n", &h, &c, &t)
		ans := int64(0)
		if (h + c) >= t*2 {
			ans = 2
		} else if t >= h {
			ans = 1
		} else {
			ans1 := (h - t) / (2*t - h - c)
			if ans1 < 0 {
				ans1 = 0
			}
			ans2 := ans1 + 1
			diff1 := math.Abs(float64(t) - (float64(ans1)*float64(h+c)+float64(h))/float64(2*ans1+1))
			diff2 := math.Abs(float64(t) - (float64(ans2)*float64(h+c)+float64(h))/float64(2*ans2+1))
			if diff1 <= diff2 {
				ans = ans1*2 + 1
			} else {
				ans = ans2*2 + 1
			}
			if ans1 > 0 {
				ans3 := ans1 - 1
				diff3 := math.Abs(float64(t) - (float64(ans3)*float64(h+c)+float64(h))/float64(2*ans3+1))
				//fmt.Println(diff1, diff2, diff3, ans1, ans2, ans3)
				if diff3 <= diff1 {
					ans = ans3 * 2
				}
			}
		}
		fmt.Fprintf(out, "%d\n", ans)
	}
	return
}

package main

import (
	"fmt"
)

func solve() {
	var t int
	fmt.Scanf("%d\n", &t)
	// t = 1
	for i := 0; i < t; i++ {
		var h, c, t int
		fmt.Scanf("%d %d %d\n", &h, &c, &t)
		var res int
		if h + c >= 2 * t {
			res = 2
		} else {
			var res2 float64 = float64(t - h) / float64(h + c - 2 * t)
			if res2 - float64(int(res2)) > 0.5 {
				res = int(res2 + 1)
			} else {
				res = int(res2)
			}
			res = res * 2 + 1
		}
		fmt.Printf("%d\n", res)
	}
}

func main() {
	solve()
}

package main

import (
	"fmt"
	"math"
)

func solve() {
	var t int
	fmt.Scanf("%d\n", &t)
	// t = 1
	for i := 0; i < t; i++ {
		var h, c, t int
		fmt.Scanf("%d %d %d\n", &h, &c, &t)
		var res int
		if h + c >= 2 * t {
			res = 2
		} else {
			var res2 float64 = float64(t - h) / float64(h + c - 2 * t)
			res2 = math.Floor(res2);
			dif1 := math.Abs(float64(t) - (float64(h) * (res2 + 1) + float64(c) * res2) / (res2 * 2 + 1))
			dif2 := math.Abs(float64(t) - (float64(h) * (res2 + 2) + float64(c) * (res2 + 1)) / ((res2 + 1) * 2 + 1))
			res = int(res2)
			if (dif1 > dif2) {
				res++
			}
			res = res * 2 + 1
		}
		fmt.Printf("%d\n", res)
	}
}

func main() {
	solve()
}

package main

import (
	"fmt"
)

func solve() {
	var t int
	fmt.Scanf("%d\n", &t)
	// t = 1
	for i := 0; i < t; i++ {
		var h, c, t int
		fmt.Scanf("%d %d %d\n", &h, &c, &t)
		var res int
		if h + c == 2 * t {
			res = 2
		} else {
			var res2 float64 = float64(t - h) / float64(h + c - 2 * t)
			if res2 - float64(int(res2)) > 0.5 {
				res = int(res2 + 1)
			} else {
				res = int(res2)
			}
			res = res * 2 + 1
		}
		fmt.Printf("%d\n", res)
	}
}

func main() {
	solve()
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		// PrintfDebug("initial\n")
		fmt.Println(1)
		return
	}

	// 平均が一致するときは2回
	if (h+c)%2 == 0 && (h+c)/2 == t {
		// PrintfDebug("pittari\n")
		fmt.Println(2)
		return
	}

	hf, cf, tf := float64(h), float64(c), float64(t)

	// ターゲットが平均値以下のときも2回
	avg := (hf + cf) / 2.0
	if tf <= avg {
		// PrintfDebug("lower avg\n")
		fmt.Println(2)
		return
	}

	an, av := tyokuzen(hf, cf, tf)
	bn, bv := tyokugo(hf, cf, tf)
	if math.Abs(av-tf) < math.Abs(bv-tf) {
		ans := (an + 1) + an
		fmt.Println(ans)
	} else {
		ans := (bn + 1) + bn
		fmt.Println(ans)
	}
}

func tyokuzen(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(0, PowInt(10, 12), func(mid int64) bool {
		mf := float64(mid)
		// bunshi := (mf+1)*hf + mf*cf
		// bunbo := 2.0*mf + 1.0
		// target := bunshi / bunbo
		target := calcTarget(mf, hf, cf)

		return target >= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}
func tyokugo(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(PowInt(10, 12), 0, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target <= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func calcTarget(af, hf, cf float64) float64 {
	bunshi := (af+1)*hf + af*cf
	bunbo := 2.0*af + 1.0

	return bunshi / bunbo
}

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	for int(math.Abs(float64(ok-ng))) > 1 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

// PowInt is integer version of math.Pow
// PowInt calculate a power by Binary Power (二分累乗法(O(log e))).
func PowInt(a, e int64) int64 {
	if a < 0 || e < 0 {
		panic(errors.New("[argument error]: PowInt does not accept negative integers"))
	}

	if e == 0 {
		return 1
	}

	if e%2 == 0 {
		halfE := e / 2
		half := PowInt(a, halfE)
		return half * half
	}

	return a * PowInt(a, e-1)
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int64
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt64_3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		fmt.Println(1)
		return
	}

	// ターゲットが平均値以下のときは2回
	if h+c >= 2*t {
		fmt.Println(2)
		return
	}

	a := tyokuzen(h, c, t)
	// b := tyokugo(h, c, t)
	b := a + 1
	ct := t * (2*a + 1) * (2*b + 1)
	A := (2*b + 1) * ((a+1)*h + a*c)
	B := (2*a + 1) * ((b+1)*h + b*c)
	if A-ct < ct-B {
		fmt.Println(2*a + 1)
	} else {
		fmt.Println(2*b + 1)
	}
}

func tyokuzen(h, c, t int64) int64 {
	ok := BinarySearch(0, 1000000000, func(mid int64) bool {
		return (mid+1)*h+mid*c > (2*mid+1)*t
	})

	return ok
}

// func tyokugo(h, c, t int64) int64 {
// 	ok := BinarySearch(100000, 0, func(mid int64) bool {
// 		return (mid+1)*h+mid*c < (2*mid+1)*t
// 	})

// 	return ok
// }

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	for int(math.Abs(float64(ok-ng))) > 1 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		// PrintfDebug("initial\n")
		fmt.Println(1)
		return
	}

	// 平均が一致するときは2回
	if (h+c)%2 == 0 && (h+c)/2 == t {
		// PrintfDebug("pittari\n")
		fmt.Println(2)
		return
	}

	hf, cf, tf := float64(h), float64(c), float64(t)

	// ターゲットが平均値以下のときも2回
	avg := (hf + cf) / 2.0
	if tf <= avg {
		// PrintfDebug("lower avg\n")
		fmt.Println(2)
		return
	}

	an, av := tyokuzen(hf, cf, tf)
	bn, bv := tyokugo(hf, cf, tf)
	if math.Abs(av-tf) < math.Abs(bv-tf) {
		ans := (an + 1) + an
		fmt.Println(ans)
	} else {
		ans := (bn + 1) + bn
		fmt.Println(ans)
	}
}

func tyokuzen(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(0, PowInt(10, 12), func(mid int64) bool {
		mf := float64(mid)
		// bunshi := (mf+1)*hf + mf*cf
		// bunbo := 2.0*mf + 1.0
		// target := bunshi / bunbo
		target := calcTarget(mf, hf, cf)

		return target > tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}
func tyokugo(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(PowInt(10, 12), 0, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target < tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func calcTarget(af, hf, cf float64) float64 {
	bunshi := (af+1)*hf + af*cf
	bunbo := 2.0*af + 1.0

	return bunshi / bunbo
}

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	// for int(math.Abs(float64(ok-ng))) > 1 {
	for AbsInt(ok-ng) > 1 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

// AbsInt is integer version of math.Abs
func AbsInt(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

// PowInt is integer version of math.Pow
// PowInt calculate a power by Binary Power (二分累乗法(O(log e))).
func PowInt(a, e int64) int64 {
	if a < 0 || e < 0 {
		panic(errors.New("[argument error]: PowInt does not accept negative integers"))
	}

	if e == 0 {
		return 1
	}

	if e%2 == 0 {
		halfE := e / 2
		half := PowInt(a, halfE)
		return half * half
	}

	return a * PowInt(a, e-1)
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int64
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt64_3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		fmt.Println(1)
		return
	}

	// ターゲットが平均値以下のときは2回
	if h+c >= 2*t {
		fmt.Println(2)
		return
	}

	a := tyokuzen(h, c, t)
	// b := tyokugo(h, c, t)
	b := a + 1
	ct := t * (2*a + 1) * (2*b + 1)
	A := (2*b + 1) * ((a+1)*h + a*c)
	B := (2*a + 1) * ((b+1)*h + b*c)
	if A-ct < ct-B {
		fmt.Println(2*a + 1)
	} else {
		fmt.Println(2*b + 1)
	}
}

func tyokuzen(h, c, t int64) int64 {
	ok := BinarySearch(0, 1000000, func(mid int64) bool {
		return (mid+1)*h+mid*c > (2*mid+1)*t
	})

	return ok
}

// func tyokugo(h, c, t int64) int64 {
// 	ok := BinarySearch(100000, 0, func(mid int64) bool {
// 		return (mid+1)*h+mid*c < (2*mid+1)*t
// 	})

// 	return ok
// }

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	for int(math.Abs(float64(ok-ng))) > 1 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		// PrintfDebug("initial\n")
		fmt.Println(1)
		return
	}

	// 平均が一致するときは2回
	if (h+c)%2 == 0 && (h+c)/2 == t {
		// PrintfDebug("pittari\n")
		fmt.Println(2)
		return
	}

	hf, cf, tf := float64(h), float64(c), float64(t)

	// ターゲットが平均値以下のときも2回
	avg := (hf + cf) / 2.0
	if tf <= avg {
		// PrintfDebug("lower avg\n")
		fmt.Println(2)
		return
	}

	an, av := tyokuzen(hf, cf, tf)
	// PrintfDebug("直前: %v, %v\n", an, av)
	bn, bv := tyokugo(hf, cf, tf)
	// PrintfDebug("直後: %v, %v\n", bn, bv)
	// if math.Abs(av-tf) <= math.Abs(bv-tf) {
	if av-tf <= tf-bv {
		ans := (an + 1) + an
		fmt.Println(ans)
	} else {
		ans := (bn + 1) + bn
		fmt.Println(ans)
	}
}

func tyokuzen(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(0, INF_BIT60, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target >= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func tyokugo(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(INF_INT64, 0, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target <= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func calcTarget(af, hf, cf float64) float64 {
	bunshi := (af+1)*hf + af*cf
	bunbo := 2.0*af + 1.0

	return bunshi / bunbo
}

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	// for int(math.Abs(float64(ok-ng))) > 1 {
	for AbsInt(ok-ng) > 1 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

// AbsInt is integer version of math.Abs
func AbsInt(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

// PowInt is integer version of math.Pow
// PowInt calculate a power by Binary Power (二分累乗法(O(log e))).
func PowInt(a, e int64) int64 {
	if a < 0 || e < 0 {
		panic(errors.New("[argument error]: PowInt does not accept negative integers"))
	}

	if e == 0 {
		return 1
	}

	if e%2 == 0 {
		halfE := e / 2
		half := PowInt(a, halfE)
		return half * half
	}

	return a * PowInt(a, e-1)
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		// PrintfDebug("initial\n")
		fmt.Println(1)
		return
	}

	// 平均が一致するときは2回
	if (h+c)%2 == 0 && (h+c)/2 == t {
		// PrintfDebug("pittari\n")
		fmt.Println(2)
		return
	}

	hf, cf, tf := float64(h), float64(c), float64(t)

	// ターゲットが平均値以下のときも2回
	avg := (hf + cf) / 2.0
	if tf <= avg {
		// PrintfDebug("lower avg\n")
		fmt.Println(2)
		return
	}

	an, av := tyokuzen(hf, cf, tf)
	// PrintfDebug("直前: %v, %v\n", an, av)
	bn, bv := tyokugo(hf, cf, tf)
	// PrintfDebug("直後: %v, %v\n", bn, bv)
	// if math.Abs(av-tf) <= math.Abs(bv-tf) {
	if av-tf <= tf-bv {
		ans := (an + 1) + an
		fmt.Println(ans)
	} else {
		ans := (bn + 1) + bn
		fmt.Println(ans)
	}
}

func tyokuzen(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(0, INF_INT32, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target >= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func tyokugo(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(INF_INT32, 0, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target <= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func calcTarget(af, hf, cf float64) float64 {
	bunshi := (af+1)*hf + af*cf
	bunbo := 2.0*af + 1.0

	return bunshi / bunbo
}

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	// for int(math.Abs(float64(ok-ng))) > 1 {
	// for AbsInt(ok-ng) > 1 {
	for int(math.Abs(float64(ok)-float64(ng))) > 1.0 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

// AbsInt is integer version of math.Abs
func AbsInt(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

// PowInt is integer version of math.Pow
// PowInt calculate a power by Binary Power (二分累乗法(O(log e))).
func PowInt(a, e int64) int64 {
	if a < 0 || e < 0 {
		panic(errors.New("[argument error]: PowInt does not accept negative integers"))
	}

	if e == 0 {
		return 1
	}

	if e%2 == 0 {
		halfE := e / 2
		half := PowInt(a, halfE)
		return half * half
	}

	return a * PowInt(a, e-1)
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int64
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt64_3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		fmt.Println(1)
		return
	}

	// ターゲットが平均値以下のときは2回
	if h+c >= 2*t {
		fmt.Println(2)
		return
	}

	a := tyokuzen(h, c, t)
	// b := tyokugo(h, c, t)
	b := a + 1
	ct := t * (2*a + 1) * (2*b + 1)
	A := (2*b + 1) * ((a+1)*h + a*c)
	B := (2*a + 1) * ((b+1)*h + b*c)
	if A-ct < ct-B {
		fmt.Println(2*a + 1)
	} else {
		fmt.Println(2*b + 1)
	}
}

func tyokuzen(h, c, t int64) int64 {
	ok := BinarySearch(0, 10000, func(mid int64) bool {
		return (mid+1)*h+mid*c > (2*mid+1)*t
	})

	return ok
}

// func tyokugo(h, c, t int64) int64 {
// 	ok := BinarySearch(100000, 0, func(mid int64) bool {
// 		return (mid+1)*h+mid*c < (2*mid+1)*t
// 	})

// 	return ok
// }

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	for int(math.Abs(float64(ok-ng))) > 1 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int64
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt64_3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		fmt.Println(1)
		return
	}

	// ターゲットが平均値以下のときは2回
	if h+c >= 2*t {
		fmt.Println(2)
		return
	}

	a := tyokuzen(h, c, t)
	// b := tyokugo(h, c, t)
	b := a + 1
	ct := t * (2*a + 1) * (2*b + 1)
	A := (2*b + 1) * ((a+1)*h + a*c)
	B := (2*a + 1) * ((b+1)*h + b*c)
	if A-ct < ct-B {
		fmt.Println(2*a + 1)
	} else {
		fmt.Println(2*b + 1)
	}
}

func tyokuzen(h, c, t int64) int64 {
	ok := BinarySearch(0, 100000, func(mid int64) bool {
		return (mid+1)*h+mid*c > (2*mid+1)*t
	})

	return ok
}

// func tyokugo(h, c, t int64) int64 {
// 	ok := BinarySearch(100000, 0, func(mid int64) bool {
// 		return (mid+1)*h+mid*c < (2*mid+1)*t
// 	})

// 	return ok
// }

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	for int(math.Abs(float64(ok-ng))) > 1 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		// PrintfDebug("initial\n")
		fmt.Println(1)
		return
	}

	// 平均が一致するときは2回
	if (h+c)%2 == 0 && (h+c)/2 == t {
		// PrintfDebug("pittari\n")
		fmt.Println(2)
		return
	}

	hf, cf, tf := float64(h), float64(c), float64(t)

	// ターゲットが平均値以下のときも2回
	avg := (hf + cf) / 2.0
	if tf <= avg {
		// PrintfDebug("lower avg\n")
		fmt.Println(2)
		return
	}

	an, av := tyokuzen(hf, cf, tf)
	// PrintfDebug("直前: %v, %v\n", an, av)
	bn, bv := tyokugo(hf, cf, tf)
	// PrintfDebug("直後: %v, %v\n", bn, bv)
	// if math.Abs(av-tf) <= math.Abs(bv-tf) {
	if av-tf <= tf-bv {
		ans := (an + 1) + an
		fmt.Println(ans)
	} else {
		ans := (bn + 1) + bn
		fmt.Println(ans)
	}
}

func tyokuzen(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(0, INF_INT64, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target >= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func tyokugo(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(INF_INT64, 0, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target <= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func calcTarget(af, hf, cf float64) float64 {
	bunshi := (af+1)*hf + af*cf
	bunbo := 2.0*af + 1.0

	return bunshi / bunbo
}

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	// for int(math.Abs(float64(ok-ng))) > 1 {
	for AbsInt(ok-ng) > 1 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

// AbsInt is integer version of math.Abs
func AbsInt(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

// PowInt is integer version of math.Pow
// PowInt calculate a power by Binary Power (二分累乗法(O(log e))).
func PowInt(a, e int64) int64 {
	if a < 0 || e < 0 {
		panic(errors.New("[argument error]: PowInt does not accept negative integers"))
	}

	if e == 0 {
		return 1
	}

	if e%2 == 0 {
		halfE := e / 2
		half := PowInt(a, halfE)
		return half * half
	}

	return a * PowInt(a, e-1)
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		// PrintfDebug("initial\n")
		fmt.Println(1)
		return
	}

	// 平均が一致するときは2回
	if (h+c)%2 == 0 && (h+c)/2 == t {
		// PrintfDebug("pittari\n")
		fmt.Println(2)
		return
	}

	hf, cf, tf := float64(h), float64(c), float64(t)

	// ターゲットが平均値以下のときも2回
	avg := (hf + cf) / 2.0
	if tf <= avg {
		// PrintfDebug("lower avg\n")
		fmt.Println(2)
		return
	}

	an, av := tyokuzen(hf, cf, tf)
	// PrintfDebug("直前: %v, %v\n", an, av)
	bn, bv := tyokugo(hf, cf, tf)
	// PrintfDebug("直後: %v, %v\n", bn, bv)
	// if math.Abs(av-tf) <= math.Abs(bv-tf) {
	if av-tf <= tf-bv {
		ans := (an + 1) + an
		fmt.Println(ans)
	} else {
		ans := (bn + 1) + bn
		fmt.Println(ans)
	}
}

func tyokuzen(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(0, INF_BIT60*4, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target >= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func tyokugo(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(INF_BIT60*4, 0, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target <= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func calcTarget(af, hf, cf float64) float64 {
	bunshi := (af+1)*hf + af*cf
	bunbo := 2.0*af + 1.0

	return bunshi / bunbo
}

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	// for int(math.Abs(float64(ok-ng))) > 1 {
	// for AbsInt(ok-ng) > 1 {
	for int(math.Abs(float64(ok)-float64(ng))) > 1.0 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

// AbsInt is integer version of math.Abs
func AbsInt(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

// PowInt is integer version of math.Pow
// PowInt calculate a power by Binary Power (二分累乗法(O(log e))).
func PowInt(a, e int64) int64 {
	if a < 0 || e < 0 {
		panic(errors.New("[argument error]: PowInt does not accept negative integers"))
	}

	if e == 0 {
		return 1
	}

	if e%2 == 0 {
		halfE := e / 2
		half := PowInt(a, halfE)
		return half * half
	}

	return a * PowInt(a, e-1)
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		// PrintfDebug("initial\n")
		fmt.Println(1)
		return
	}

	// 平均が一致するときは2回
	if (h+c)%2 == 0 && (h+c)/2 == t {
		// PrintfDebug("pittari\n")
		fmt.Println(2)
		return
	}

	hf, cf, tf := float64(h), float64(c), float64(t)

	// ターゲットが平均値以下のときも2回
	avg := (hf + cf) / 2.0
	if tf <= avg {
		// PrintfDebug("lower avg\n")
		fmt.Println(2)
		return
	}

	an, av := tyokuzen(hf, cf, tf)
	// PrintfDebug("直前: %v, %v\n", an, av)
	bn, bv := tyokugo(hf, cf, tf)
	// PrintfDebug("直後: %v, %v\n", bn, bv)
	// if math.Abs(av-tf) <= math.Abs(bv-tf) {
	if av-tf <= tf-bv {
		ans := (an + 1) + an
		fmt.Println(ans)
	} else {
		ans := (bn + 1) + bn
		fmt.Println(ans)
	}
}

func tyokuzen(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(0, INF_INT32, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target > tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func tyokugo(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(INF_INT32, 0, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target < tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func calcTarget(af, hf, cf float64) float64 {
	bunshi := (af+1)*hf + af*cf
	bunbo := 2.0*af + 1.0

	return bunshi / bunbo
}

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	// for int(math.Abs(float64(ok-ng))) > 1 {
	// for AbsInt(ok-ng) > 1 {
	for int(math.Abs(float64(ok)-float64(ng))) > 1.0 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

// AbsInt is integer version of math.Abs
func AbsInt(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

// PowInt is integer version of math.Pow
// PowInt calculate a power by Binary Power (二分累乗法(O(log e))).
func PowInt(a, e int64) int64 {
	if a < 0 || e < 0 {
		panic(errors.New("[argument error]: PowInt does not accept negative integers"))
	}

	if e == 0 {
		return 1
	}

	if e%2 == 0 {
		halfE := e / 2
		half := PowInt(a, halfE)
		return half * half
	}

	return a * PowInt(a, e-1)
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		// PrintfDebug("initial\n")
		fmt.Println(1)
		return
	}

	// 平均が一致するときは2回
	if (h+c)%2 == 0 && (h+c)/2 == t {
		// PrintfDebug("pittari\n")
		fmt.Println(2)
		return
	}

	hf, cf, tf := float64(h), float64(c), float64(t)

	// ターゲットが平均値以下のときも2回
	avg := (hf + cf) / 2.0
	if tf <= avg {
		// PrintfDebug("lower avg\n")
		fmt.Println(2)
		return
	}

	an, av := tyokuzen(hf, cf, tf)
	bn, bv := tyokugo(hf, cf, tf)
	if math.Abs(av-tf) < math.Abs(bv-tf) {
		ans := (an + 1) + an
		fmt.Println(ans)
	} else {
		ans := (bn + 1) + bn
		fmt.Println(ans)
	}
}

func tyokuzen(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(0, INF_BIT60, func(mid int64) bool {
		mf := float64(mid)
		// bunshi := (mf+1)*hf + mf*cf
		// bunbo := 2.0*mf + 1.0
		// target := bunshi / bunbo
		target := calcTarget(mf, hf, cf)

		return target >= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}
func tyokugo(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(INF_BIT60, 0, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target <= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func calcTarget(af, hf, cf float64) float64 {
	bunshi := (af+1)*hf + af*cf
	bunbo := 2.0*af + 1.0

	return bunshi / bunbo
}

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	for int(math.Abs(float64(ok-ng))) > 1 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		// PrintfDebug("initial\n")
		fmt.Println(1)
		return
	}

	// 平均が一致するときは2回
	if (h+c)%2 == 0 && (h+c)/2 == t {
		// PrintfDebug("pittari\n")
		fmt.Println(2)
		return
	}

	hf, cf, tf := float64(h), float64(c), float64(t)

	// ターゲットが平均値以下のときも2回
	avg := (hf + cf) / 2.0
	if tf <= avg {
		// PrintfDebug("lower avg\n")
		fmt.Println(2)
		return
	}

	an, av := tyokuzen(hf, cf, tf)
	// PrintfDebug("直前: %v, %v\n", an, av)
	bn, bv := tyokugo(hf, cf, tf)
	// PrintfDebug("直後: %v, %v\n", bn, bv)
	// if math.Abs(av-tf) <= math.Abs(bv-tf) {
	if av-tf <= tf-bv {
		ans := (an + 1) + an
		fmt.Println(ans)
	} else {
		ans := (bn + 1) + bn
		fmt.Println(ans)
	}
}

func tyokuzen(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(0, PowInt(10, 11), func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target >= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func tyokugo(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(PowInt(10, 11), 0, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target <= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func calcTarget(af, hf, cf float64) float64 {
	bunshi := (af+1)*hf + af*cf
	bunbo := 2.0*af + 1.0

	return bunshi / bunbo
}

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	// for int(math.Abs(float64(ok-ng))) > 1 {
	// for AbsInt(ok-ng) > 1 {
	for int(math.Abs(float64(ok)-float64(ng))) > 1.0 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

// AbsInt is integer version of math.Abs
func AbsInt(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

// PowInt is integer version of math.Pow
// PowInt calculate a power by Binary Power (二分累乗法(O(log e))).
func PowInt(a, e int64) int64 {
	if a < 0 || e < 0 {
		panic(errors.New("[argument error]: PowInt does not accept negative integers"))
	}

	if e == 0 {
		return 1
	}

	if e%2 == 0 {
		halfE := e / 2
		half := PowInt(a, halfE)
		return half * half
	}

	return a * PowInt(a, e-1)
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int64
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt64_3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		fmt.Println(1)
		return
	}

	// ターゲットが平均値以下のときは2回
	if h+c >= 2*t {
		fmt.Println(2)
		return
	}

	a := tyokuzen(h, c, t)
	// b := tyokugo(h, c, t)
	b := a + 1
	ct := t * (2*a + 1) * (2*b + 1)
	A := (2*b + 1) * ((a+1)*h + a*c)
	B := (2*a + 1) * ((b+1)*h + b*c)
	if A-ct < ct-B {
		fmt.Println(2*a + 1)
	} else {
		fmt.Println(2*b + 1)
	}
}

func tyokuzen(h, c, t int64) int64 {
	ok := BinarySearch(0, 500000, func(mid int64) bool {
		return (mid+1)*h+mid*c >= (2*mid+1)*t
	})

	return ok
}

// func tyokugo(h, c, t int64) int64 {
// 	ok := BinarySearch(100000, 0, func(mid int64) bool {
// 		return (mid+1)*h+mid*c < (2*mid+1)*t
// 	})

// 	return ok
// }

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	for int(math.Abs(float64(ok-ng))) > 1 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int64
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt64_3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		fmt.Println(1)
		return
	}

	// ターゲットが平均値以下のときは2回
	if h+c >= 2*t {
		fmt.Println(2)
		return
	}

	a := tyokuzen(h, c, t)
	b := tyokugo(h, c, t)
	ct := t * (2*a + 1) * (2*b + 1)
	A := (2*b + 1) * ((a+1)*h + a*c)
	B := (2*a + 1) * ((b+1)*h + b*c)
	if A-ct < ct-B {
		fmt.Println(2*a + 1)
	} else {
		fmt.Println(2*b + 1)
	}
}

func tyokuzen(h, c, t int64) int64 {
	ok := BinarySearch(0, 100000, func(mid int64) bool {
		return (mid+1)*h+mid*c > (2*mid+1)*t
	})

	return ok
}

func tyokugo(h, c, t int64) int64 {
	ok := BinarySearch(100000, 0, func(mid int64) bool {
		return (mid+1)*h+mid*c < (2*mid+1)*t
	})

	return ok
}

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	for int(math.Abs(float64(ok-ng))) > 1 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		// PrintfDebug("initial\n")
		fmt.Println(1)
		return
	}

	// 平均が一致するときは2回
	if (h+c)%2 == 0 && (h+c)/2 == t {
		// PrintfDebug("pittari\n")
		fmt.Println(2)
		return
	}

	hf, cf, tf := float64(h), float64(c), float64(t)

	// ターゲットが平均値以下のときも2回
	avg := (hf + cf) / 2.0
	if tf <= avg {
		// PrintfDebug("lower avg\n")
		fmt.Println(2)
		return
	}

	an, av := tyokuzen(hf, cf, tf)
	// PrintfDebug("直前: %v, %v\n", an, av)
	bn, bv := tyokugo(hf, cf, tf)
	// PrintfDebug("直後: %v, %v\n", bn, bv)
	// if math.Abs(av-tf) <= math.Abs(bv-tf) {
	if av-tf <= tf-bv {
		ans := (an + 1) + an
		fmt.Println(ans)
	} else {
		ans := (bn + 1) + bn
		fmt.Println(ans)
	}
}

func tyokuzen(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(0, PowInt(10, 12), func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target >= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func tyokugo(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(PowInt(10, 12), 0, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target <= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func calcTarget(af, hf, cf float64) float64 {
	bunshi := (af+1)*hf + af*cf
	bunbo := 2.0*af + 1.0

	return bunshi / bunbo
}

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	// for int(math.Abs(float64(ok-ng))) > 1 {
	// for AbsInt(ok-ng) > 1 {
	for int(math.Abs(float64(ok)-float64(ng))) > 1.0 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

// AbsInt is integer version of math.Abs
func AbsInt(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

// PowInt is integer version of math.Pow
// PowInt calculate a power by Binary Power (二分累乗法(O(log e))).
func PowInt(a, e int64) int64 {
	if a < 0 || e < 0 {
		panic(errors.New("[argument error]: PowInt does not accept negative integers"))
	}

	if e == 0 {
		return 1
	}

	if e%2 == 0 {
		halfE := e / 2
		half := PowInt(a, halfE)
		return half * half
	}

	return a * PowInt(a, e-1)
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		// PrintfDebug("initial\n")
		fmt.Println(1)
		return
	}

	// 平均が一致するときは2回
	if (h+c)%2 == 0 && (h+c)/2 == t {
		// PrintfDebug("pittari\n")
		fmt.Println(2)
		return
	}

	hf, cf, tf := float64(h), float64(c), float64(t)

	// ターゲットが平均値以下のときも2回
	avg := (hf + cf) / 2.0
	if tf <= avg {
		// PrintfDebug("lower avg\n")
		fmt.Println(2)
		return
	}

	an, av := tyokuzen(hf, cf, tf)
	// PrintfDebug("直前: %v, %v\n", an, av)
	bn, bv := tyokugo(hf, cf, tf)
	// PrintfDebug("直後: %v, %v\n", bn, bv)
	// if math.Abs(av-tf) <= math.Abs(bv-tf) {
	if av-tf <= tf-bv {
		ans := (an + 1) + an
		fmt.Println(ans)
	} else {
		ans := (bn + 1) + bn
		fmt.Println(ans)
	}
}

func tyokuzen(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(0, INF_BIT60*4, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target >= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func tyokugo(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(INF_BIT60*4, 0, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target <= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func calcTarget(af, hf, cf float64) float64 {
	bunshi := (af+1)*hf + af*cf
	bunbo := 2.0*af + 1.0

	return bunshi / bunbo
}

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	// for int(math.Abs(float64(ok-ng))) > 1 {
	for AbsInt(ok-ng) > 1 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

// AbsInt is integer version of math.Abs
func AbsInt(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

// PowInt is integer version of math.Pow
// PowInt calculate a power by Binary Power (二分累乗法(O(log e))).
func PowInt(a, e int64) int64 {
	if a < 0 || e < 0 {
		panic(errors.New("[argument error]: PowInt does not accept negative integers"))
	}

	if e == 0 {
		return 1
	}

	if e%2 == 0 {
		halfE := e / 2
		half := PowInt(a, halfE)
		return half * half
	}

	return a * PowInt(a, e-1)
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int64
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt64_3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		fmt.Println(1)
		return
	}

	// ターゲットが平均値以下のときは2回
	if h+c >= 2*t {
		fmt.Println(2)
		return
	}

	a := tyokuzen(h, c, t)
	// b := tyokugo(h, c, t)
	b := a + 1
	ct := t * (2*a + 1) * (2*b + 1)
	A := (2*b + 1) * ((a+1)*h + a*c)
	B := (2*a + 1) * ((b+1)*h + b*c)
	if A-ct < ct-B {
		fmt.Println(2*a + 1)
	} else {
		fmt.Println(2*b + 1)
	}
}

func tyokuzen(h, c, t int64) int64 {
	ok := BinarySearch(0, 500000, func(mid int64) bool {
		return (mid+1)*h+mid*c > (2*mid+1)*t
	})

	return ok
}

// func tyokugo(h, c, t int64) int64 {
// 	ok := BinarySearch(100000, 0, func(mid int64) bool {
// 		return (mid+1)*h+mid*c < (2*mid+1)*t
// 	})

// 	return ok
// }

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	for int(math.Abs(float64(ok-ng))) > 1 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		// PrintfDebug("initial\n")
		fmt.Println(1)
		return
	}

	// 平均が一致するときは2回
	if (h+c)%2 == 0 && (h+c)/2 == t {
		// PrintfDebug("pittari\n")
		fmt.Println(2)
		return
	}

	hf, cf, tf := float64(h), float64(c), float64(t)

	// ターゲットが平均値以下のときも2回
	avg := (hf + cf) / 2.0
	if tf <= avg {
		// PrintfDebug("lower avg\n")
		fmt.Println(2)
		return
	}

	an, av := tyokuzen(hf, cf, tf)
	bn, bv := tyokugo(hf, cf, tf)
	if math.Abs(av-tf) < math.Abs(bv-tf) {
		ans := (an + 1) + an
		fmt.Println(ans)
	} else {
		ans := (bn + 1) + bn
		fmt.Println(ans)
	}
}

func tyokuzen(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(0, PowInt(10, 18), func(mid int64) bool {
		mf := float64(mid)
		// bunshi := (mf+1)*hf + mf*cf
		// bunbo := 2.0*mf + 1.0
		// target := bunshi / bunbo
		target := calcTarget(mf, hf, cf)

		return target > tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}
func tyokugo(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(PowInt(10, 18), 0, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target < tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func calcTarget(af, hf, cf float64) float64 {
	bunshi := (af+1)*hf + af*cf
	bunbo := 2.0*af + 1.0

	return bunshi / bunbo
}

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	// for int(math.Abs(float64(ok-ng))) > 1 {
	for AbsInt(ok-ng) > 1 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

// AbsInt is integer version of math.Abs
func AbsInt(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

// PowInt is integer version of math.Pow
// PowInt calculate a power by Binary Power (二分累乗法(O(log e))).
func PowInt(a, e int64) int64 {
	if a < 0 || e < 0 {
		panic(errors.New("[argument error]: PowInt does not accept negative integers"))
	}

	if e == 0 {
		return 1
	}

	if e%2 == 0 {
		halfE := e / 2
		half := PowInt(a, halfE)
		return half * half
	}

	return a * PowInt(a, e-1)
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		// PrintfDebug("initial\n")
		fmt.Println(1)
		return
	}

	// 平均が一致するときは2回
	if (h+c)%2 == 0 && (h+c)/2 == t {
		// PrintfDebug("pittari\n")
		fmt.Println(2)
		return
	}

	hf, cf, tf := float64(h), float64(c), float64(t)

	// ターゲットが平均値以下のときも2回
	avg := (hf + cf) / 2.0
	if tf <= avg {
		// PrintfDebug("lower avg\n")
		fmt.Println(2)
		return
	}

	an, av := tyokuzen(hf, cf, tf)
	bn, bv := tyokugo(hf, cf, tf)
	if math.Abs(av-tf) < math.Abs(bv-tf) {
		ans := (an + 1) + an
		fmt.Println(ans)
	} else {
		ans := (bn + 1) + bn
		fmt.Println(ans)
	}
}

func tyokuzen(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(0, INF_BIT30, func(mid int64) bool {
		mf := float64(mid)
		// bunshi := (mf+1)*hf + mf*cf
		// bunbo := 2.0*mf + 1.0
		// target := bunshi / bunbo
		target := calcTarget(mf, hf, cf)

		return target >= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}
func tyokugo(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(INF_BIT30, 0, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target <= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func calcTarget(af, hf, cf float64) float64 {
	bunshi := (af+1)*hf + af*cf
	bunbo := 2.0*af + 1.0

	return bunshi / bunbo
}

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	for int(math.Abs(float64(ok-ng))) > 1 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		// PrintfDebug("initial\n")
		fmt.Println(1)
		return
	}

	// 平均が一致するときは2回
	if (h+c)%2 == 0 && (h+c)/2 == t {
		// PrintfDebug("pittari\n")
		fmt.Println(2)
		return
	}

	hf, cf, tf := float64(h), float64(c), float64(t)

	// ターゲットが平均値以下のときも2回
	avg := (hf + cf) / 2.0
	if tf <= avg {
		// PrintfDebug("lower avg\n")
		fmt.Println(2)
		return
	}

	an, av := tyokuzen(hf, cf, tf)
	// PrintfDebug("直前: %v, %v\n", an, av)
	bn, bv := tyokugo(hf, cf, tf)
	// PrintfDebug("直後: %v, %v\n", bn, bv)
	if math.Abs(av-tf) <= math.Abs(bv-tf) {
		ans := (an + 1) + an
		fmt.Println(ans)
	} else {
		ans := (bn + 1) + bn
		fmt.Println(ans)
	}
}

func tyokuzen(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(0, INF_INT64, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target >= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func tyokugo(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(INF_INT64, 0, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target <= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func calcTarget(af, hf, cf float64) float64 {
	bunshi := (af+1)*hf + af*cf
	bunbo := 2.0*af + 1.0

	return bunshi / bunbo
}

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	// for int(math.Abs(float64(ok-ng))) > 1 {
	for AbsInt(ok-ng) > 1 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

// AbsInt is integer version of math.Abs
func AbsInt(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

// PowInt is integer version of math.Pow
// PowInt calculate a power by Binary Power (二分累乗法(O(log e))).
func PowInt(a, e int64) int64 {
	if a < 0 || e < 0 {
		panic(errors.New("[argument error]: PowInt does not accept negative integers"))
	}

	if e == 0 {
		return 1
	}

	if e%2 == 0 {
		halfE := e / 2
		half := PowInt(a, halfE)
		return half * half
	}

	return a * PowInt(a, e-1)
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int64
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt64_3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		fmt.Println(1)
		return
	}

	// ターゲットが平均値以下のときは2回
	if h+c >= 2*t {
		fmt.Println(2)
		return
	}

	a := tyokuzen(h, c, t)
	b := tyokugo(h, c, t)
	ct := t * (2*a + 1) * (2*b + 1)
	A := (2*b + 1) * ((a+1)*h + a*c)
	B := (2*a + 1) * ((b+1)*h + b*c)
	if A-ct < ct-B {
		fmt.Println(2*a + 1)
	} else {
		fmt.Println(2*b + 1)
	}
}

func tyokuzen(h, c, t int64) int64 {
	ok := BinarySearch(0, INF_BIT30, func(mid int64) bool {
		return (mid+1)*h+mid*c > (2*mid+1)*t
	})

	return ok
}

func tyokugo(h, c, t int64) int64 {
	ok := BinarySearch(INF_BIT30, 0, func(mid int64) bool {
		return (mid+1)*h+mid*c < (2*mid+1)*t
	})

	return ok
}

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	for int(math.Abs(float64(ok-ng))) > 1 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		// PrintfDebug("initial\n")
		fmt.Println(1)
		return
	}

	// 平均が一致するときは2回
	if (h+c)%2 == 0 && (h+c)/2 == t {
		// PrintfDebug("pittari\n")
		fmt.Println(2)
		return
	}

	hf, cf, tf := float64(h), float64(c), float64(t)

	// ターゲットが平均値以下のときも2回
	avg := (hf + cf) / 2.0
	if tf <= avg {
		// PrintfDebug("lower avg\n")
		fmt.Println(2)
		return
	}

	an, av := tyokuzen(hf, cf, tf)
	// PrintfDebug("直前: %v, %v\n", an, av)
	bn, bv := tyokugo(hf, cf, tf)
	// PrintfDebug("直後: %v, %v\n", bn, bv)
	// if math.Abs(av-tf) <= math.Abs(bv-tf) {
	if av-tf <= tf-bv {
		ans := (an + 1) + an
		fmt.Println(ans)
	} else {
		ans := (bn + 1) + bn
		fmt.Println(ans)
	}
}

func tyokuzen(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(0, INF_BIT60*2, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target >= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func tyokugo(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(INF_BIT60*2, 0, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target <= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func calcTarget(af, hf, cf float64) float64 {
	bunshi := (af+1)*hf + af*cf
	bunbo := 2.0*af + 1.0

	return bunshi / bunbo
}

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	for int(math.Abs(float64(ok-ng))) > 1 {
		// for AbsInt(ok-ng) > 1 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

// AbsInt is integer version of math.Abs
func AbsInt(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

// PowInt is integer version of math.Pow
// PowInt calculate a power by Binary Power (二分累乗法(O(log e))).
func PowInt(a, e int64) int64 {
	if a < 0 || e < 0 {
		panic(errors.New("[argument error]: PowInt does not accept negative integers"))
	}

	if e == 0 {
		return 1
	}

	if e%2 == 0 {
		halfE := e / 2
		half := PowInt(a, halfE)
		return half * half
	}

	return a * PowInt(a, e-1)
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		// PrintfDebug("initial\n")
		fmt.Println(1)
		return
	}

	// 平均が一致するときは2回
	if (h+c)%2 == 0 && (h+c)/2 == t {
		// PrintfDebug("pittari\n")
		fmt.Println(2)
		return
	}

	hf, cf, tf := float64(h), float64(c), float64(t)

	// ターゲットが平均値以下のときも2回
	avg := (hf + cf) / 2.0
	if tf <= avg {
		// PrintfDebug("lower avg\n")
		fmt.Println(2)
		return
	}

	an, av := tyokuzen(hf, cf, tf)
	bn, bv := tyokugo(hf, cf, tf)
	if math.Abs(av-tf) < math.Abs(bv-tf) {
		ans := (an + 1) + an
		fmt.Println(ans)
	} else {
		ans := (bn + 1) + bn
		fmt.Println(ans)
	}
}

func tyokuzen(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(0, PowInt(10, 10), func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target > tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func tyokugo(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(PowInt(10, 10), 0, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target < tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func calcTarget(af, hf, cf float64) float64 {
	bunshi := (af+1)*hf + af*cf
	bunbo := 2.0*af + 1.0

	return bunshi / bunbo
}

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	// for int(math.Abs(float64(ok-ng))) > 1 {
	for AbsInt(ok-ng) > 1 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

// AbsInt is integer version of math.Abs
func AbsInt(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

// PowInt is integer version of math.Pow
// PowInt calculate a power by Binary Power (二分累乗法(O(log e))).
func PowInt(a, e int64) int64 {
	if a < 0 || e < 0 {
		panic(errors.New("[argument error]: PowInt does not accept negative integers"))
	}

	if e == 0 {
		return 1
	}

	if e%2 == 0 {
		halfE := e / 2
		half := PowInt(a, halfE)
		return half * half
	}

	return a * PowInt(a, e-1)
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		// PrintfDebug("initial\n")
		fmt.Println(1)
		return
	}

	// 平均が一致するときは2回
	if (h+c)%2 == 0 && (h+c)/2 == t {
		// PrintfDebug("pittari\n")
		fmt.Println(2)
		return
	}

	hf, cf, tf := float64(h), float64(c), float64(t)

	// ターゲットが平均値以下のときも2回
	avg := (hf + cf) / 2.0
	if tf <= avg {
		// PrintfDebug("lower avg\n")
		fmt.Println(2)
		return
	}

	an, av := tyokuzen(hf, cf, tf)
	bn, bv := tyokugo(hf, cf, tf)
	if math.Abs(av-tf) < math.Abs(bv-tf) {
		ans := (an + 1) + an
		fmt.Println(ans)
	} else {
		ans := (bn + 1) + bn
		fmt.Println(ans)
	}
}

func tyokuzen(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(0, INF_BIT60, func(mid int64) bool {
		mf := float64(mid)
		// bunshi := (mf+1)*hf + mf*cf
		// bunbo := 2.0*mf + 1.0
		// target := bunshi / bunbo
		target := calcTarget(mf, hf, cf)

		return target > tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}
func tyokugo(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(INF_BIT60, 0, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target < tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func calcTarget(af, hf, cf float64) float64 {
	bunshi := (af+1)*hf + af*cf
	bunbo := 2.0*af + 1.0

	return bunshi / bunbo
}

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	for int(math.Abs(float64(ok-ng))) > 1 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		// PrintfDebug("initial\n")
		fmt.Println(1)
		return
	}

	// 平均が一致するときは2回
	if (h+c)%2 == 0 && (h+c)/2 == t {
		// PrintfDebug("pittari\n")
		fmt.Println(2)
		return
	}

	hf, cf, tf := float64(h), float64(c), float64(t)

	// ターゲットが平均値以下のときも2回
	avg := (hf + cf) / 2.0
	if tf <= avg {
		// PrintfDebug("lower avg\n")
		fmt.Println(2)
		return
	}

	an, av := tyokuzen(hf, cf, tf)
	// PrintfDebug("直前: %v, %v\n", an, av)
	bn, bv := tyokugo(hf, cf, tf)
	// PrintfDebug("直後: %v, %v\n", bn, bv)
	// if math.Abs(av-tf) <= math.Abs(bv-tf) {
	if av-tf <= tf-bv {
		ans := (an + 1) + an
		fmt.Println(ans)
	} else {
		ans := (bn + 1) + bn
		fmt.Println(ans)
	}
}

func tyokuzen(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(0, INF_BIT60*4, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target >= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func tyokugo(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(INF_BIT60*4, 0, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target <= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func calcTarget(af, hf, cf float64) float64 {
	bunshi := (af+1)*hf + af*cf
	bunbo := 2.0*af + 1.0

	return bunshi / bunbo
}

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	// for int(math.Abs(float64(ok-ng))) > 1 {
	// for AbsInt(ok-ng) > 1 {
	for int(math.Abs(float64(ok)-float64(ng))) > 1 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

// AbsInt is integer version of math.Abs
func AbsInt(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

// PowInt is integer version of math.Pow
// PowInt calculate a power by Binary Power (二分累乗法(O(log e))).
func PowInt(a, e int64) int64 {
	if a < 0 || e < 0 {
		panic(errors.New("[argument error]: PowInt does not accept negative integers"))
	}

	if e == 0 {
		return 1
	}

	if e%2 == 0 {
		halfE := e / 2
		half := PowInt(a, halfE)
		return half * half
	}

	return a * PowInt(a, e-1)
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		// PrintfDebug("initial\n")
		fmt.Println(1)
		return
	}

	// 平均が一致するときは2回
	if (h+c)%2 == 0 && (h+c)/2 == t {
		// PrintfDebug("pittari\n")
		fmt.Println(2)
		return
	}

	hf, cf, tf := float64(h), float64(c), float64(t)

	// ターゲットが平均値以下のときも2回
	avg := (hf + cf) / 2.0
	if tf <= avg {
		// PrintfDebug("lower avg\n")
		fmt.Println(2)
		return
	}

	an, av := tyokuzen(hf, cf, tf)
	// PrintfDebug("直前: %v, %v\n", an, av)
	bn, bv := tyokugo(hf, cf, tf)
	// PrintfDebug("直後: %v, %v\n", bn, bv)
	// if math.Abs(av-tf) <= math.Abs(bv-tf) {
	if av-tf <= tf-bv {
		ans := (an + 1) + an
		fmt.Println(ans)
	} else {
		ans := (bn + 1) + bn
		fmt.Println(ans)
	}
}

func tyokuzen(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(0, INF_BIT60*2, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target >= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func tyokugo(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(INF_BIT60*2, 0, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target <= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func calcTarget(af, hf, cf float64) float64 {
	bunshi := (af+1)*hf + af*cf
	bunbo := 2.0*af + 1.0

	return bunshi / bunbo
}

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	// for int(math.Abs(float64(ok-ng))) > 1 {
	for AbsInt(ok-ng) > 1 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

// AbsInt is integer version of math.Abs
func AbsInt(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

// PowInt is integer version of math.Pow
// PowInt calculate a power by Binary Power (二分累乗法(O(log e))).
func PowInt(a, e int64) int64 {
	if a < 0 || e < 0 {
		panic(errors.New("[argument error]: PowInt does not accept negative integers"))
	}

	if e == 0 {
		return 1
	}

	if e%2 == 0 {
		halfE := e / 2
		half := PowInt(a, halfE)
		return half * half
	}

	return a * PowInt(a, e-1)
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		// PrintfDebug("initial\n")
		fmt.Println(1)
		return
	}

	// 平均が一致するときは2回
	if (h+c)%2 == 0 && (h+c)/2 == t {
		// PrintfDebug("pittari\n")
		fmt.Println(2)
		return
	}

	hf, cf, tf := float64(h), float64(c), float64(t)

	// ターゲットが平均値以下のときも2回
	avg := (hf + cf) / 2.0
	if tf <= avg {
		// PrintfDebug("lower avg\n")
		fmt.Println(2)
		return
	}

	an, av := tyokuzen(hf, cf, tf)
	bn, bv := tyokugo(hf, cf, tf)
	if math.Abs(av-tf) < math.Abs(bv-tf) {
		ans := (an + 1) + an
		fmt.Println(ans)
	} else {
		ans := (bn + 1) + bn
		fmt.Println(ans)
	}
}

func tyokuzen(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(0, PowInt(10, 12), func(mid int64) bool {
		mf := float64(mid)
		// bunshi := (mf+1)*hf + mf*cf
		// bunbo := 2.0*mf + 1.0
		// target := bunshi / bunbo
		target := calcTarget(mf, hf, cf)

		return target >= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}
func tyokugo(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(PowInt(10, 12), 0, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target <= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func calcTarget(af, hf, cf float64) float64 {
	bunshi := (af+1)*hf + af*cf
	bunbo := 2.0*af + 1.0

	return bunshi / bunbo
}

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	// for int(math.Abs(float64(ok-ng))) > 1 {
	for AbsInt(ok-ng) > 1 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

// AbsInt is integer version of math.Abs
func AbsInt(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

// PowInt is integer version of math.Pow
// PowInt calculate a power by Binary Power (二分累乗法(O(log e))).
func PowInt(a, e int64) int64 {
	if a < 0 || e < 0 {
		panic(errors.New("[argument error]: PowInt does not accept negative integers"))
	}

	if e == 0 {
		return 1
	}

	if e%2 == 0 {
		halfE := e / 2
		half := PowInt(a, halfE)
		return half * half
	}

	return a * PowInt(a, e-1)
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		// PrintfDebug("initial\n")
		fmt.Println(1)
		return
	}

	// 平均が一致するときは2回
	if (h+c)%2 == 0 && (h+c)/2 == t {
		// PrintfDebug("pittari\n")
		fmt.Println(2)
		return
	}

	hf, cf, tf := float64(h), float64(c), float64(t)

	// ターゲットが平均値以下のときも2回
	avg := (hf + cf) / 2.0
	if tf <= avg {
		// PrintfDebug("lower avg\n")
		fmt.Println(2)
		return
	}

	an, av := tyokuzen(hf, cf, tf)
	// PrintfDebug("直前: %v, %v\n", an, av)
	bn, bv := tyokugo(hf, cf, tf)
	// PrintfDebug("直後: %v, %v\n", bn, bv)
	// if math.Abs(av-tf) <= math.Abs(bv-tf) {
	if av-tf <= tf-bv {
		ans := (an + 1) + an
		fmt.Println(ans)
	} else {
		ans := (bn + 1) + bn
		fmt.Println(ans)
	}
}

func tyokuzen(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(0, PowInt(10, 10), func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target >= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func tyokugo(hf, cf, tf float64) (int64, float64) {
	ok := BinarySearch(PowInt(10, 10), 0, func(mid int64) bool {
		mf := float64(mid)
		target := calcTarget(mf, hf, cf)

		return target <= tf
	})

	af := float64(ok)
	vf := calcTarget(af, hf, cf)

	return ok, vf
}

func calcTarget(af, hf, cf float64) float64 {
	bunshi := (af+1)*hf + af*cf
	bunbo := 2.0*af + 1.0

	return bunshi / bunbo
}

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	// for int(math.Abs(float64(ok-ng))) > 1 {
	// for AbsInt(ok-ng) > 1 {
	for int(math.Abs(float64(ok)-float64(ng))) > 1.0 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

// AbsInt is integer version of math.Abs
func AbsInt(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

// PowInt is integer version of math.Pow
// PowInt calculate a power by Binary Power (二分累乗法(O(log e))).
func PowInt(a, e int64) int64 {
	if a < 0 || e < 0 {
		panic(errors.New("[argument error]: PowInt does not accept negative integers"))
	}

	if e == 0 {
		return 1
	}

	if e%2 == 0 {
		halfE := e / 2
		half := PowInt(a, halfE)
		return half * half
	}

	return a * PowInt(a, e-1)
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/contest/1359/problem/C
*/

package main

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
)

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	T int

	h, c, t int64
)

func main() {
	// fmt.Println((4.0*41.0 + 3.0*15.0) / 7.0)
	T = ReadInt()
	for i := 0; i < T; i++ {
		h, c, t = ReadInt64_3()
		solve()
	}
}

func solve() {
	// t == h なら1回
	if h == t {
		fmt.Println(1)
		return
	}

	// ターゲットが平均値以下のときは2回
	if h+c >= 2*t {
		fmt.Println(2)
		return
	}

	a := tyokuzen(h, c, t)
	b := tyokugo(h, c, t)
	ct := t * (2*a + 1) * (2*b + 1)
	A := (2*b + 1) * ((a+1)*h + a*c)
	B := (2*a + 1) * ((b+1)*h + b*c)
	if A-ct < ct-B {
		fmt.Println(2*a + 1)
	} else {
		fmt.Println(2*b + 1)
	}
}

func tyokuzen(h, c, t int64) int64 {
	ok := BinarySearch(0, 1000000, func(mid int64) bool {
		return (mid+1)*h+mid*c > (2*mid+1)*t
	})

	return ok
}

func tyokugo(h, c, t int64) int64 {
	ok := BinarySearch(1000000, 0, func(mid int64) bool {
		return (mid+1)*h+mid*c < (2*mid+1)*t
	})

	return ok
}

func BinarySearch(initOK, initNG int64, isOK func(mid int64) bool) (ok int64) {
	ng := initNG
	ok = initOK
	for int(math.Abs(float64(ok-ng))) > 1 {
		mid := (ok + ng) / 2
		if isOK(mid) {
			ok = mid
		} else {
			ng = mid
		}
	}

	return ok
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)

var nTest int
var h, c, t float64

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	fmt.Fscan(in, &nTest)

	for i := 0; i < nTest; i++ {
		fmt.Fscan(in, &h, &c, &t)

		if t <= (h+c)/2 {
			fmt.Fprintln(out, 2)
			continue
		}

		k := (float64)((int)((h - t) / (2*t - h - c)))
		// fmt.Println("k=", k)
		v1 := ((k+1)*h + k*c) / (2*k + 1)
		v2 := ((k+2)*h + (k+1)*c) / (2*(k+1) + 1)
		// fmt.Println("v1-t=", v1, "v2-t=", v2)
		if math.Abs(float64(v1-t)) <= math.Abs(float64(v2-t)) {
			fmt.Fprintln(out, k*2+1)
		} else {
			fmt.Fprintln(out, (k+1)*2+1)
		}
	}
	out.Flush()
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)

var nTest int
var h, c, t float64

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	fmt.Fscan(in, &nTest)

	for i := 0; i < nTest; i++ {
		fmt.Fscan(in, &h, &c, &t)

		if t <= (h+c)/2 {
			fmt.Fprintln(out, 2)
			continue
		}

		k := (float64)((int)((h - t) / (2*t - h - c)))
		v1 := ((k+1)*h + k*c) / (2*k + 1)
		v2 := ((k+2)*h + (k+1)*c) / (2*(k+1) + 1)
		// fmt.Println("v1-t=", v1-t, "v2-t=", v2-t)
		if math.Abs(float64(v1-t)) < math.Abs(float64(v2-t)) {
			fmt.Fprintln(out, k*2+1)
		} else {
			fmt.Fprintln(out, (k+1)*2+1)
		}
	}
	out.Flush()
}

package main

import (
	"bufio"
	"fmt"
	"os"
)

func abs(x int) int {
	if x >= 0 {
		return x
	}
	return -x
}

func main() {
	in, out := bufio.NewReader(os.Stdin), bufio.NewWriter(os.Stdout)
	defer out.Flush()

	scan := func(a ...interface{}) {
		fmt.Fscan(in, a...)
	}
	println := func(a ...interface{}) {
		fmt.Fprintln(out, a...)
	}

	var T int
	for scan(&T); T > 0; T-- {
		var h, c, t int
		scan(&h, &c, &t)
		var n int
		if 2*t <= h+c {
			n = 2
		} else {
			x := (h - t) / (2*t - h - c)
			if abs(((x+2)*h+(x+1)*c)-(2*(x+1)+1)*t) < abs(((x+1)*h+x*c)-(2*x+1)*t) {
				x++
			}
			n = 2*x + 1
		}
		println(n)
	}
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)

var h, c, t float64

func main() {
	reader := bufio.NewReader(os.Stdin)

	var n int

	fmt.Fscanf(reader, "%d\n", &n)

	for ; n > 0; n-- {
		fmt.Fscanf(reader, "%f %f %f\n", &h, &c, &t)
		if h == t {
			fmt.Println(1)
			continue
		}

		if h+c >= t+t {
			fmt.Println(2)
			continue
		}

		left, right := 0, 1<<30
		for left+3 <= right {
			lmid := left + (right-left)/3
			rmid := right - (right-left)/3
			if diff(lmid) > diff(rmid) {
				left = lmid
			} else {
				right = rmid
			}
		}

		ans := right
		for ; left <= right; right-- {
			if diff(ans) >= diff(right) {
				ans = right
			}
		}

		fmt.Println(2*ans + 1)
	}
}

func diff(x int) float64 {
	xf := float64(x)
	return math.Abs((xf*(h+c)+h)/(2.0*xf+1) - t)
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)

func main() {
	reader := bufio.NewReader(os.Stdin)

	var n int

	fmt.Fscanf(reader, "%d\n", &n)

	var h, c, t float64
	for ; n > 0; n-- {
		fmt.Fscanf(reader, "%f %f %f\n", &h, &c, &t)
		if h == t {
			fmt.Println(1)
			continue
		}

		if h+c >= t+t {
			fmt.Println(2)
			continue
		}

		x := math.Trunc((h - t) / (t - c + t - h))
		b1 := ((x+1)*h + x*c) / (2*x + 1)
		b2 := ((x+1+1)*h + (x+1)*c) / (2*x + 3)
		// fmt.Println(b1, t, b2)
		if math.Abs(t-b1) > math.Abs(t-b2) {
			fmt.Println(int64(2*x + 3))
		} else {
			fmt.Println(int64(2*x + 1))
		}
	}
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)

func main() {
	reader := bufio.NewReader(os.Stdin)

	var n int

	fmt.Fscanf(reader, "%d\n", &n)

	var h, c, t float64
	for ; n > 0; n-- {
		fmt.Fscanf(reader, "%f %f %f\n", &h, &c, &t)
		if h == t {
			fmt.Println(1)
			continue
		}

		if h+c >= t+t {
			fmt.Println(2)
			continue
		}

		x := math.Trunc((h - t) / (t - c + t - h))
		b1 := ((x+1)*h + x*c) / (2*x + 1)
		b2 := ((x+1+1)*h + (x+1)*c) / (2*x + 3)
		// fmt.Println(b1, t, b2)
		if math.Abs(t-b1) < math.Abs(t-b2) {
			fmt.Println(int64(2*x + 1))
		} else {
			fmt.Println(int64(2*x + 3))
		}
	}
}

package main

import (
	"fmt"
	"bufio"
	"os"
	"math"
)
var fin *bufio.Reader = bufio.NewReader(os.Stdin)
var fout *bufio.Writer = bufio.NewWriter(os.Stdout)
func max(a int, b int) int { if(a > b) { return a } else { return b }}
func main() {
	defer fout.Flush()
	var asdf int
	fmt.Fscan(fin, &asdf)
	for ; asdf > 0; asdf-- {
		var h, c, t float64
		fmt.Fscan(fin, &h, &c, &t)
		ans := 2
		m := (h+c)/2
		best := math.Abs(t-m)
		x := math.Floor((h-m)/(t-m))
		if int(x)%2 == 0 {
			x--;
		}
		if math.Abs(t-m-(h-m)/x) < best {
			best = math.Abs(t-m-(h-m)/x)
			ans = int(x)
		}
		x += 2
		if math.Abs(t-m-(h-m)/x) < best {
			best = math.Abs(t-m-(h-m)/x)
			ans = int(x)
		}
		fmt.Fprintln(fout, ans)
	}
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"math/big"
	"os"
	"strconv"
)

func getScanner(fp *os.File) *bufio.Scanner {
	scanner := bufio.NewScanner(fp)
	scanner.Split(bufio.ScanWords)
	scanner.Buffer(make([]byte, 1000005), 1000005)
	return scanner
}
func getNextString(scanner *bufio.Scanner) string {
	scanner.Scan()
	return scanner.Text()
}
func getNextInt(scanner *bufio.Scanner) int {
	i, _ := strconv.Atoi(getNextString(scanner))
	return i
}
func getNextInt64(scanner *bufio.Scanner) int64 {
	i, _ := strconv.ParseInt(getNextString(scanner), 10, 64)
	return i
}
func getNextUint64(scanner *bufio.Scanner) uint64 {
	i, _ := strconv.ParseUint(getNextString(scanner), 10, 64)
	return i
}
func getNextFloat64(scanner *bufio.Scanner) float64 {
	i, _ := strconv.ParseFloat(getNextString(scanner), 64)
	return i
}
func main() {
	fp := os.Stdin
	wfp := os.Stdout
	cnt := 0
	if os.Getenv("MASPY") == "ますピ" {
		fp, _ = os.Open(os.Getenv("BEET_THE_HARMONY_OF_PERFECT"))
		cnt = 0
	}
	if os.Getenv("MASPYPY") == "ますピッピ" {
		wfp, _ = os.Create(os.Getenv("NGTKANA_IS_GENIUS10"))
	}
	scanner := getScanner(fp)
	writer := bufio.NewWriter(wfp)
	solve(scanner, writer)
	for i := 0; i < cnt; i++ {
		fmt.Fprintln(writer, "-----------------------------------")
		solve(scanner, writer)
	}
	writer.Flush()
}
func solve(scanner *bufio.Scanner, writer *bufio.Writer) {
	t := getNextInt(scanner)
	for i := 0; i < t; i++ {
		testcase(scanner, writer)
	}
}

func testcase(scanner *bufio.Scanner, writer *bufio.Writer) {
	h := getNextInt64(scanner)
	c := getNextInt64(scanner)
	t := getNextInt64(scanner)
	if t >= h {
		fmt.Fprintln(writer, 1)
		return
	}
	if t*2 <= h+c {
		fmt.Fprintln(writer, 2)
		return
	}
	l := int64(-1)
	r := int64(math.MaxInt64)
	for l+1 < r {
		m := (r + l) >> 1
		if added(muled(h, m), muled(c, m-1)).Cmp(muled(t, m<<1-1)) == 1 {
			l = m
			continue
		}
		r = m
	}
	if abs(subed(added(muled(h, l), muled(c, l-1)), muled(t, l<<1-1))).Cmp(abs(subed(added(muled(h, r), muled(c, r-1)), muled(t, r<<1-1)))) == 1 {
		fmt.Fprintln(writer, r<<1-1)
		return
	}
	fmt.Fprintln(writer, l<<1-1)
}

func muled(a, b int64) *big.Int {
	return big.NewInt(0).Mul(big.NewInt(a), big.NewInt(b))
}
func added(a, b *big.Int) *big.Int {
	return big.NewInt(0).Add(a, b)
}
func subed(a, b *big.Int) *big.Int {
	return big.NewInt(0).Sub(a, b)
}
func dived(a, b *big.Int) *big.Int {
	return big.NewInt(0).Div(a, b)
}
func abs(a *big.Int) *big.Int {
	return big.NewInt(0).Abs(a)
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
)

func getScanner(fp *os.File) *bufio.Scanner {
	scanner := bufio.NewScanner(fp)
	scanner.Split(bufio.ScanWords)
	scanner.Buffer(make([]byte, 1000005), 1000005)
	return scanner
}
func getNextString(scanner *bufio.Scanner) string {
	scanner.Scan()
	return scanner.Text()
}
func getNextInt(scanner *bufio.Scanner) int {
	i, _ := strconv.Atoi(getNextString(scanner))
	return i
}
func getNextInt64(scanner *bufio.Scanner) int64 {
	i, _ := strconv.ParseInt(getNextString(scanner), 10, 64)
	return i
}
func getNextUint64(scanner *bufio.Scanner) uint64 {
	i, _ := strconv.ParseUint(getNextString(scanner), 10, 64)
	return i
}
func getNextFloat64(scanner *bufio.Scanner) float64 {
	i, _ := strconv.ParseFloat(getNextString(scanner), 64)
	return i
}
func main() {
	fp := os.Stdin
	wfp := os.Stdout
	cnt := 0
	if os.Getenv("MASPY") == "ますピ" {
		fp, _ = os.Open(os.Getenv("BEET_THE_HARMONY_OF_PERFECT"))
		cnt = 0
	}
	if os.Getenv("MASPYPY") == "ますピッピ" {
		wfp, _ = os.Create(os.Getenv("NGTKANA_IS_GENIUS10"))
	}
	scanner := getScanner(fp)
	writer := bufio.NewWriter(wfp)
	solve(scanner, writer)
	for i := 0; i < cnt; i++ {
		fmt.Fprintln(writer, "-----------------------------------")
		solve(scanner, writer)
	}
	writer.Flush()
}
func solve(scanner *bufio.Scanner, writer *bufio.Writer) {
	t := getNextInt(scanner)
	for i := 0; i < t; i++ {
		testcase(scanner, writer)
	}
}

func testcase(scanner *bufio.Scanner, writer *bufio.Writer) {
	h := getNextInt64(scanner)
	c := getNextInt64(scanner)
	t := getNextInt64(scanner)
	if t >= h {
		fmt.Fprintln(writer, 1)
		return
	}
	if t*2 <= h+c {
		fmt.Fprintln(writer, 2)
		return
	}
	l := int64(-1)
	r := int64(math.MaxInt64 / 10000000)
	for l+1 < r {
		m := l + (r-l)>>1
		if h*m+c*(m-1) > t*(m<<1-1) {
			l = m
			continue
		}
		r = m
	}
	if math.Abs(float64(h*l+c*(l-1)-t*(l<<1-1))) > math.Abs(float64(h*r+c*(r-1)-t*(r<<1-1))) {
		fmt.Fprintln(writer, r<<1-1)
		return
	}
	fmt.Fprintln(writer, l<<1-1)
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"math/big"
	"os"
	"strconv"
)

func getScanner(fp *os.File) *bufio.Scanner {
	scanner := bufio.NewScanner(fp)
	scanner.Split(bufio.ScanWords)
	scanner.Buffer(make([]byte, 1000005), 1000005)
	return scanner
}
func getNextString(scanner *bufio.Scanner) string {
	scanner.Scan()
	return scanner.Text()
}
func getNextInt(scanner *bufio.Scanner) int {
	i, _ := strconv.Atoi(getNextString(scanner))
	return i
}
func getNextInt64(scanner *bufio.Scanner) int64 {
	i, _ := strconv.ParseInt(getNextString(scanner), 10, 64)
	return i
}
func getNextUint64(scanner *bufio.Scanner) uint64 {
	i, _ := strconv.ParseUint(getNextString(scanner), 10, 64)
	return i
}
func getNextFloat64(scanner *bufio.Scanner) float64 {
	i, _ := strconv.ParseFloat(getNextString(scanner), 64)
	return i
}
func main() {
	fp := os.Stdin
	wfp := os.Stdout
	cnt := 0
	if os.Getenv("MASPY") == "ますピ" {
		fp, _ = os.Open(os.Getenv("BEET_THE_HARMONY_OF_PERFECT"))
		cnt = 0
	}
	if os.Getenv("MASPYPY") == "ますピッピ" {
		wfp, _ = os.Create(os.Getenv("NGTKANA_IS_GENIUS10"))
	}
	scanner := getScanner(fp)
	writer := bufio.NewWriter(wfp)
	solve(scanner, writer)
	for i := 0; i < cnt; i++ {
		fmt.Fprintln(writer, "-----------------------------------")
		solve(scanner, writer)
	}
	writer.Flush()
}
func solve(scanner *bufio.Scanner, writer *bufio.Writer) {
	t := getNextInt(scanner)
	for i := 0; i < t; i++ {
		testcase(scanner, writer)
	}
}

func testcase(scanner *bufio.Scanner, writer *bufio.Writer) {
	h := getNextInt64(scanner)
	c := getNextInt64(scanner)
	t := getNextInt64(scanner)
	if t >= h {
		fmt.Fprintln(writer, 1)
		return
	}
	if t*2 <= h+c {
		fmt.Fprintln(writer, 2)
		return
	}
	l := int64(-1)
	r := int64(math.MaxInt64 / 2)
	for l+1 < r {
		m := (r + l) >> 1
		if added(muled(h, m), muled(c, m-1)).Cmp(muled(t, m<<1-1)) == 1 {
			l = m
			continue
		}
		r = m
	}
	if abs(dived(subed(added(muled(h, l), muled(c, l-1)), muled(t, l<<1-1)), big.NewInt(l<<1-1))).Cmp(abs(dived(subed(added(muled(h, r), muled(c, r-1)), muled(t, r<<1-1)), big.NewInt(r<<1-1)))) == -1 {
		fmt.Fprintln(writer, r<<1-1)
		return
	}
	fmt.Fprintln(writer, l<<1-1)
}

func muled(a, b int64) *big.Int {
	return big.NewInt(0).Mul(big.NewInt(a), big.NewInt(b))
}
func added(a, b *big.Int) *big.Int {
	return big.NewInt(0).Add(a, b)
}
func subed(a, b *big.Int) *big.Int {
	return big.NewInt(0).Sub(a, b)
}
func dived(a, b *big.Int) *big.Int {
	return big.NewInt(0).Div(a, b)
}
func abs(a *big.Int) *big.Int {
	return big.NewInt(0).Abs(a)
}