fn main() { let mut xx = String::new(); std::io::Read::read_to_string(&mut std::io::stdin(), &mut xx).ok(); let xx: Vec = xx.split_whitespace().skip(1).flat_map(str::parse).collect(); let answer = xx .chunks(2) .map(|x| ((x[0] + 1) * x[1]).to_string()) .collect::>() .join("\n"); println!("{answer}"); }