use proconio::{input, source::line::LineSource}; use std::io::{stdin, stdout, BufReader, Write}; fn main() { let stdin = stdin(); let mut source = LineSource::new(BufReader::new(stdin.lock())); let mut right = 1 << 30; while true { right = right / 2; println!("{}", right); stdout().flush().unwrap(); input! { from &mut source, ok: usize, } if ok == 1 { println!("{}", right); break; } } }