#include #include #include #include #include #include #include #include #include #include using namespace std; //#define __int64 long long //#define long __int64 #define REP(i,a,b) for(int i=a;i> result; if(result == 0){ cout << "! 100" << endl; return 0; } if(result == -1){ //100以下用 mind = 0; maxd = 100; for(i=1; i<100; i++){ check = (mind + maxd) / 2; cout << "? " << (check - i) << endl; cin >> result; if(result == 0){ break; } if(result == -1){ maxd = check; }else{ mind = check; } } cout << "! " << check << endl; return 0; } for(i=1; i<100; i++){ check = (mind + maxd) / 2; cout << "? " << (check - i) << endl; cin >> result; if(result == 0){ break; } if(result == -1){ maxd = check; }else{ mind = check; } } cout << "! " << check << endl; return 0; }