#include #include #include using namespace std; int main(){ int l = 0, r = 1000000001; while(r - l > 1) { int m = (l + r) / 2; cout << "? " << m; int a; cin >> a; cin.clear(); if(a == 0) { r = m; } else { l = m; } } cout << "! " << l << endl; }