#include #include #include #define REP(i,a,b) for(i=a;i 0) { if(n&1) res = res * x; x = x * x; n >>= 1; } return res; } int main(void) { int i,j,k; ll left = 0, right = ll_pow(10,9)+1,mid; while(left < right) { mid = (left+right)/2; printf("? %lld\n",mid); int rep; scanf("%d",&rep); if(rep) left = mid; else right = mid-1; if(mid == (left+right)/2) break; } printf("! %lld\n",mid); return 0; }