#K43097. List Transformation

    ID: 27233 Type: Default 1000ms 256MiB

List Transformation

List Transformation

You are given a list of integers and a single integer value. Your task is to produce a new list in which each element is the sum of the corresponding element from the input list and the given integer. In mathematical terms, for an input list \(a = [a_1, a_2, \dots, a_n]\) and an integer \(v\), you should output the list \(b = [a_1 + v, a_2 + v, \dots, a_n + v]\).

For example, if the input list is [3, 1, 4, 1, 5, 9] and \(v = 10\), then the output should be [13, 11, 14, 11, 15, 19].

inputFormat

The input consists of three lines:

  1. The first line contains an integer \(n\), representing the number of elements in the list.
  2. The second line contains \(n\) space-separated integers.
  3. The third line contains an integer \(v\), the value to add to each element of the list.

outputFormat

Output a single line with the transformed list as space-separated integers. If the list is empty (i.e., \(n = 0\)), output nothing.

## sample
6
3 1 4 1 5 9
10
13 11 14 11 15 19