import scala.collection.mutable import scala.collection.mutable.ArrayBuffer import scala.io.StdIn.* import scala.math.* import scala.util.chaining.* @main def main = val testCase = readLine().toInt val maxValue = BigDecimal("1222" + "0" * 72) for _ <- 0 until testCase do var max = log10(12.22 * 0.999991) + 74 var min = log10(0.000009) for _ <- 0 until 24 do val mid = (min + max) / 2 val x = f"${pow(10, mid)}%.15f" println(s"? ${maxValue.min(BigDecimal(x)).formatted("%.15f")}") val response = readLine().trim val yes = response == "Yes" if yes then min = mid else max = mid //println(max - min) println(s"! ${maxValue.min(BigDecimal(f"${pow(10, (min + max) / 2)}%.15f")).formatted("%.15f")}")