private static int CalculateAnswer(int min, int max)
return Math.Round((min + max) / 2);
private static int Guess(int guessedNumber, int mint, int max)
Console.WriteLine(guessedNumber);
var answer = Console.ReadLine();
Guess(CalculateAnswer(min, guessedNumber));
CalculateAnswer(guessedNumber, max);
public static void Main()
var t = Int32.Parse(Console.ReadLine());
for (var i = 0; i < t; i++)
var aAndB = Console.ReadLine();
var a = Int32.Parse(aAndB.Split(' ')[0]);
var b = Int32.Parse(aAndB.Split(' ')[1]);
var n = Int32.Parse(Console.ReadLine());
Guess(CalculateAnswer(a, b), a, b);
Console.WriteLine("Hello World");