// yukicoder: No.253 ロウソクの長さ // 2019.5.10 bal4u #include int x = 1000000000; int answer(int y) { int r; if (x < y) r = -1; else if (x > y) r = 1; else if (y == x) r = 0; x--; return r; } int ask(int y) { int a; #if 0 a = answer(y); #else printf("?%d\n", y), fflush(stdout); scanf("%d", &a); #endif return a; } int main() { int a, k, l, r, m, ans; m = 100; a = ask(m), k = 1; if (a == 0) ans = m; else { k = 1; if (a > 0) l = m, r = 1000000001; else l = 9, r = m-1; while (l < r) { m = (l + r) >> 1; a = ask(m); if (a == 0) { l = m; break; } k++; if (a > 0) l = m, r--; else l--, r = m-1; } ans = l + k; } printf("!%d\n", ans), fflush(stdout); return 0; }