問題一覧 > 通常問題

No.1108 Transposition

レベル : / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 481
作問者 : trineutron / テスター : Rute
お気に入りにしたユーザー ProblemId : 3487 / 自分の提出
問題文最終更新日: 2022-04-26 02:00:30
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 256 (順位表) の他の問題:

Problem Statement

Shifting the pitch of an entire piece of music by a fixed interval, keeping it otherwise unchanged, is called transposition. There is a piece of music with $N$ notes, whose pitches are $T_1, T_2, \dots, T_N$. Find the pitch of each note after transposing this piece up by $H$ semitones. Here, a note having pitch $T_i$ means that it is $T_i$ semitones higher than the reference note $0$.

Input

$N\ H$
$T_1\ T_2\ \dots\ T_N$

The first line contains the number of notes $N$ and $H$.
The second line contains the pitch $T_i$ of each note.

All inputs are integers.
$1 \le N \le 100$
$-100 \le H \le 100$
$-100 \le T_i \le 100$

Output

Print the pitch of each note after transposition, separated by spaces. Print a newline at the end.

Sample

Sample 1
Input
5 1
2 0 -1 -5 -3
Output
3 1 0 -4 -2

Sample 2
Input
7 -12
2 4 6 9 11 14 9
Output
-10 -8 -6 -3 -1 2 -3

Sample 3
Input
1 100
100
Output
200

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。