defmodule Main do def main do n = IO.read(:line) |> String.trim() |> String.to_integer() y = IO.read(:line) |> String.trim() |> String.split() |> Enum.map(&String.to_integer/1) solve(n, y) |> IO.puts() end def solve(n, y) do s = y |> Enum.sum() y |> Enum.map(fn i -> s - (n - 1) * i end) |> Enum.join(" ") end end