#include #include #include #include #include #include #include #include #include #include using ll = long long; using namespace std; int main(){ int low = 1, hi = 1 << 30, mid = (low + hi) / 2, q = -1, pq = -1; cout << "? " << mid << endl; while (1){ cin >> q; if (mid == low) break; else { if (q == 1) low = mid; else hi = mid; mid = (low + hi)/ 2; pq = q; cout << "? " << mid << endl; } } cout << "! " << low << endl; }