int l = Int32.MaxValue;//2147483647int r = Int32.MaxValue;//2147483647Console.WriteLine((l + r)/2);//-1Console.WriteLine(l + (r - l) / 2);//2147483647
int l = Int32.MaxValue;//2147483647
int r = Int32.MaxValue;//2147483647
Console.WriteLine((l + r)/2);//-1
Console.WriteLine(l + (r - l) / 2);//2147483647