#include #define rep(i, n) for(int i = 0; i < (int)(n); i++) using namespace std; typedef long long ll; int INF = (1LL << 30) - 1; int MOD = 1e9+7; main(){ int cnt = 1,num; cout << "? 100" << endl; fflush(0); cin >> num; int ok,ng; if(num == 0){ cout << "! 100" << endl; return 0; }else if(num == -1){ ok = 100,ng = 0; }else{ ok = INF,ng = 10; } while(num){ int mid = (ok + ng) / 2; cout << "? " << mid << endl; fflush(0); cin >> num; if(num == 1)ng = mid; else if(num == -1)ok = mid; else cout << "! " << mid+cnt << endl; ok--; ng--; cnt++; } fflush(0); }