結果

問題 No.1108 移調
ユーザー ks2mks2m
提出日時 2020-07-10 21:23:15
言語 Java21
(openjdk 21)
結果
AC  
実行時間 137 ms / 2,000 ms
コード長 444 bytes
コンパイル時間 2,002 ms
コンパイル使用メモリ 75,096 KB
実行使用メモリ 42,000 KB
最終ジャッジ日時 2024-04-19 15:26:16
合計ジャッジ時間 5,660 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
41,836 KB
testcase_01 AC 115 ms
41,512 KB
testcase_02 AC 116 ms
41,260 KB
testcase_03 AC 126 ms
41,688 KB
testcase_04 AC 110 ms
41,680 KB
testcase_05 AC 129 ms
41,788 KB
testcase_06 AC 126 ms
41,320 KB
testcase_07 AC 132 ms
42,000 KB
testcase_08 AC 137 ms
41,504 KB
testcase_09 AC 129 ms
41,600 KB
testcase_10 AC 129 ms
41,524 KB
testcase_11 AC 129 ms
41,560 KB
testcase_12 AC 116 ms
41,516 KB
testcase_13 AC 122 ms
41,732 KB
testcase_14 AC 134 ms
41,876 KB
testcase_15 AC 105 ms
41,224 KB
testcase_16 AC 125 ms
41,564 KB
testcase_17 AC 120 ms
41,684 KB
testcase_18 AC 134 ms
41,604 KB
testcase_19 AC 136 ms
41,568 KB
testcase_20 AC 126 ms
41,452 KB
testcase_21 AC 120 ms
41,488 KB
testcase_22 AC 133 ms
41,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int h = sc.nextInt();
		int[] t = new int[n];
		for (int i = 0; i < n; i++) {
			t[i] = sc.nextInt();
		}
		sc.close();

		System.out.print(t[0] + h);
		for (int i = 1; i < n; i++) {
			System.out.print(" ");
			System.out.print(t[i] + h);
		}
		System.out.println();
	}
}
0