package no246; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int left = 1; int right = (int) 1E9 + 1; while(left + 1 < right) { int c = (left + right) / 2; System.out.println("? " + c); if (sc.nextInt() == 1) { left = c; }else{ right = c; } } System.out.println("! " + left); } }