#include using namespace std; char ask(int Y){ cout << "? " << Y << endl; char res; cin >> res; return res; } int solve(){ int askCount = 0; for(int i=2;i<=50;i++,askCount++){ char res = ask(i); if(res == '<'){ return i - 1 + askCount; } if(res == '='){ return i + askCount; } } // [lo, hi) int lo = 50, hi = 1e9 - askCount + 1; for(;;++askCount){ int mid = (lo + hi) / 2; char res = ask(mid); if(res == '='){ return mid + askCount; } if(res == '<'){ hi = mid; } else { lo = mid + 1; } if(hi - lo == 1){ return lo + askCount; } --lo; --hi; } return -1; } int main(){ int Y = solve(); cout << "! " << Y << endl; return 0; }