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