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 k = (xx.len() - 1) as i64; let sum = xx.iter().sum::(); let answer = xx .iter() .map(|&n| (sum - k * n).to_string()) .collect::>() .join(" "); println!("{answer}"); }