結果

問題 No.1090 ソーシャルディスタンス / Social Distance
ユーザー na-shna-sh
提出日時 2020-07-07 17:15:02
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 216 bytes
コンパイル時間 98 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 21,600 KB
最終ジャッジ日時 2024-04-08 22:04:17
合計ジャッジ時間 5,355 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
9,856 KB
testcase_01 AC 32 ms
9,856 KB
testcase_02 AC 104 ms
17,104 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 40 ms
10,624 KB
testcase_06 WA -
testcase_07 AC 81 ms
14,800 KB
testcase_08 WA -
testcase_09 AC 84 ms
14,976 KB
testcase_10 AC 101 ms
16,712 KB
testcase_11 WA -
testcase_12 AC 88 ms
16,144 KB
testcase_13 WA -
testcase_14 AC 132 ms
19,140 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 34 ms
10,240 KB
testcase_18 WA -
testcase_19 AC 83 ms
14,756 KB
testcase_20 AC 74 ms
14,568 KB
testcase_21 AC 88 ms
16,160 KB
testcase_22 AC 30 ms
9,856 KB
testcase_23 AC 30 ms
9,856 KB
testcase_24 AC 142 ms
21,600 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, D = map(int, input().split())
a = list(map(int, input().split()))

ans = [0] * N
for i, n in enumerate(a):
    if n - ans[i] < D:
        ans[i+1] = ans[i] + D
    else:
        ans[i+1] = ans[i] + n

print(*ans)
0