fn main() { let mut t = String::new(); std::io::stdin().read_line(&mut t).ok(); let t: usize = t.trim().parse().unwrap(); for _ in 0..t { let mut n = String::new(); std::io::stdin().read_line(&mut n).ok(); let n: usize = n.trim().parse().unwrap(); let val = (n as f64).sqrt().floor() as usize; let val = if val * val > n { val-1 } else if (val+1)*(val+1) <= n { val+1 } else { val }; println!("{}", val); } }