#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define REP(i,a,b) for(int i=a;i<(int)b;i++) #define rep(i,n) REP(i,0,n) typedef long long ll; int ask(int Y){cout << "? " << Y << endl;int res;cin >> res;return res;} int res = 1e9; void solve(int curr, int depth = 0) { if(depth == 100) { return; } switch(ask(res)) { case -1: res -= curr; break; case 1: res += curr; break; case 0: return; } solve(curr/2, depth+1); } int main(){ solve(res/2); cout << "! " << res << endl; return 0; }