結果

問題 No.1090 ソーシャルディスタンス / Social Distance
ユーザー 37zigen37zigen
提出日時 2020-07-02 05:24:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 144 ms / 2,000 ms
コード長 181 bytes
コンパイル時間 241 ms
コンパイル使用メモリ 10,740 KB
実行使用メモリ 19,724 KB
最終ジャッジ日時 2023-10-12 17:09:20
合計ジャッジ時間 3,771 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,136 KB
testcase_01 AC 16 ms
8,140 KB
testcase_02 AC 99 ms
15,044 KB
testcase_03 AC 27 ms
9,284 KB
testcase_04 AC 111 ms
15,972 KB
testcase_05 AC 24 ms
8,968 KB
testcase_06 AC 135 ms
17,780 KB
testcase_07 AC 74 ms
13,060 KB
testcase_08 AC 136 ms
17,856 KB
testcase_09 AC 78 ms
13,528 KB
testcase_10 AC 95 ms
14,680 KB
testcase_11 AC 140 ms
18,380 KB
testcase_12 AC 82 ms
13,628 KB
testcase_13 AC 80 ms
13,596 KB
testcase_14 AC 125 ms
17,360 KB
testcase_15 AC 104 ms
15,240 KB
testcase_16 AC 55 ms
11,732 KB
testcase_17 AC 19 ms
8,420 KB
testcase_18 AC 58 ms
11,920 KB
testcase_19 AC 72 ms
13,484 KB
testcase_20 AC 66 ms
12,844 KB
testcase_21 AC 80 ms
13,664 KB
testcase_22 AC 16 ms
8,236 KB
testcase_23 AC 16 ms
8,252 KB
testcase_24 AC 144 ms
19,724 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools
N,D=map(int,input().split())
a=[int(x) for x in input().split()]
a=[0]+a
a=list(itertools.accumulate(a))
for i in range(1,N):
    a[i]=max(a[i-1]+D,a[i])
print(*a)
0