結果

問題 No.1090 ソーシャルディスタンス / Social Distance
ユーザー Konton7Konton7
提出日時 2020-06-26 21:41:10
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 144 ms / 2,000 ms
コード長 236 bytes
コンパイル時間 434 ms
コンパイル使用メモリ 10,764 KB
実行使用メモリ 19,624 KB
最終ジャッジ日時 2023-09-18 03:40:08
合計ジャッジ時間 3,715 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,908 KB
testcase_01 AC 16 ms
7,948 KB
testcase_02 AC 104 ms
14,996 KB
testcase_03 AC 28 ms
9,316 KB
testcase_04 AC 109 ms
15,968 KB
testcase_05 AC 24 ms
8,832 KB
testcase_06 AC 124 ms
17,720 KB
testcase_07 AC 76 ms
13,332 KB
testcase_08 AC 144 ms
17,792 KB
testcase_09 AC 82 ms
13,440 KB
testcase_10 AC 100 ms
14,848 KB
testcase_11 AC 136 ms
18,428 KB
testcase_12 AC 85 ms
13,740 KB
testcase_13 AC 86 ms
13,724 KB
testcase_14 AC 134 ms
17,372 KB
testcase_15 AC 110 ms
15,216 KB
testcase_16 AC 57 ms
11,924 KB
testcase_17 AC 19 ms
8,560 KB
testcase_18 AC 55 ms
12,168 KB
testcase_19 AC 78 ms
13,360 KB
testcase_20 AC 70 ms
13,256 KB
testcase_21 AC 85 ms
13,744 KB
testcase_22 AC 16 ms
7,880 KB
testcase_23 AC 16 ms
7,892 KB
testcase_24 AC 134 ms
19,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, d = [int(v) for v in input().split()]
a = [0]
b = [int(v) for v in input().split()]
for i in range(n - 1):
    a.append(a[-1] + b[i])

for i in range(n - 1):
    k = a[i + 1] - a[i]
    if k < d:
        a[i + 1] = a[i] + d
print(*a)
0