using System.Linq; using System; public class Hello { static void Main() { var n = int.Parse(Console.ReadLine().Trim()); string[] line = Console.ReadLine().Trim().Split(' '); var a = Array.ConvertAll(line, int.Parse); getAns(n, a); } static void getAns(int n, int[] a) { var asum = a.Sum(); var ans = new int[n]; for (int i = 0; i < n; i++) ans[i] = asum - (n - 1) * a[i]; Console.WriteLine(string.Join(" ", ans)); } }