#include int main() { int min, mid, max; min = 0; max = 1003; char res1[8], res2[8]; while (max - min > 1) { mid = (max + min) / 2; printf("? %d\n", mid); fflush(stdout); scanf("%s", res1); if (res1[0] == 's') { min = mid; continue; } printf("? %d\n", mid + 1); fflush(stdout); scanf("%s", res2); if (res2[0] == 's') min = mid + 1; else max = mid; } printf("! %d\n", min); return 0; }