x=1+z=1<<29 loop.any?{puts"? #{x}";$>.flush;gets;z/=2;x-=/0/?z<1?1:z:-z;z<1} $><<'! '<