#include #define rep(i,n) for(int i=0;i> res; return res; } void res(int Y){ cout << "! " << Y << endl; return; } int main(){ int guess = 5*pow(10,8); int temp =0; rep(i,100){ temp = guess/2; if(ask(guess) == 0){ res(guess + i); break; }else{ guess += ask(guess)*temp; } } }