#define _USE_MATH_DEFINES #define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include #include #include #include #include #include #include #include #include //#include using namespace std; int main() { long long int a=0, b = 1000000000; while (a != b) { long long int x = a + b; x /= 2; cout << "? " << x << endl; long long int y; cin >> y; if (y == 1) { a = x; if (b == a + 1)break; } else { b = x; if (b == a + 1)break; } cout << a << " " << b << endl; } cout <<"! "<< a << endl; return 0; }