結果

問題 No.1090 ソーシャルディスタンス / Social Distance
ユーザー akitsugu777akitsugu777
提出日時 2020-10-13 15:54:02
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 196 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 10,548 KB
実行使用メモリ 19,608 KB
最終ジャッジ日時 2023-09-28 00:07:25
合計ジャッジ時間 3,606 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
7,764 KB
testcase_01 AC 13 ms
7,808 KB
testcase_02 AC 106 ms
14,984 KB
testcase_03 AC 22 ms
9,324 KB
testcase_04 AC 94 ms
15,924 KB
testcase_05 AC 22 ms
8,800 KB
testcase_06 AC 108 ms
17,600 KB
testcase_07 AC 72 ms
13,176 KB
testcase_08 AC 127 ms
17,976 KB
testcase_09 AC 73 ms
13,344 KB
testcase_10 AC 85 ms
14,816 KB
testcase_11 AC 122 ms
18,504 KB
testcase_12 AC 76 ms
13,580 KB
testcase_13 AC 77 ms
13,652 KB
testcase_14 AC 118 ms
17,500 KB
testcase_15 AC 95 ms
15,356 KB
testcase_16 AC 49 ms
11,860 KB
testcase_17 AC 17 ms
8,464 KB
testcase_18 AC 48 ms
12,024 KB
testcase_19 AC 70 ms
13,180 KB
testcase_20 AC 61 ms
13,324 KB
testcase_21 AC 74 ms
13,572 KB
testcase_22 AC 13 ms
7,732 KB
testcase_23 AC 13 ms
7,764 KB
testcase_24 AC 118 ms
19,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

B = [0]
for a in A:
    B += [B[-1] + a]

for i in range(1, N):
    if B[i] - B[i-1] < D:
        B[i] = B[i-1] + D

print(*B)
0