#include using namespace std; int main(){ int max = 1e9,min = 1; bool f; for(int i = 0;i < 100;i++){ cout << "? " << (max + min) / 2 << endl; cin >> f; f ? min = (max + min) / 2 : max = (max + min) / 2; if(max - min == 1){ cout << "! " << min << endl; return 0; } } }