fn solve() -> usize { let mut x = String::new(); std::io::stdin().read_line(&mut x).ok(); let x: usize = x.trim().parse().unwrap(); for i in 2.. { if x % i > 0 { return i * x; } } 0 } fn main() { let mut n = String::new(); std::io::stdin().read_line(&mut n).ok(); let n: usize = n.trim().parse().unwrap(); let mut result = Vec::with_capacity(n); for _ in 0..n { result.push(solve()); } for &v in result.iter() { println!("{}", v); } }