結果

問題 No.1090 ソーシャルディスタンス / Social Distance
ユーザー pluto77pluto77
提出日時 2020-07-30 11:32:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 132 ms / 2,000 ms
コード長 144 bytes
コンパイル時間 107 ms
コンパイル使用メモリ 10,672 KB
実行使用メモリ 19,776 KB
最終ジャッジ日時 2023-09-16 19:02:03
合計ジャッジ時間 3,757 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,752 KB
testcase_01 AC 15 ms
7,768 KB
testcase_02 AC 91 ms
14,884 KB
testcase_03 AC 26 ms
9,236 KB
testcase_04 AC 103 ms
15,832 KB
testcase_05 AC 22 ms
8,796 KB
testcase_06 AC 116 ms
17,592 KB
testcase_07 AC 66 ms
14,108 KB
testcase_08 AC 126 ms
17,880 KB
testcase_09 AC 73 ms
13,452 KB
testcase_10 AC 88 ms
14,860 KB
testcase_11 AC 132 ms
18,500 KB
testcase_12 AC 75 ms
13,548 KB
testcase_13 AC 72 ms
13,616 KB
testcase_14 AC 117 ms
17,476 KB
testcase_15 AC 98 ms
15,244 KB
testcase_16 AC 52 ms
11,856 KB
testcase_17 AC 18 ms
8,460 KB
testcase_18 AC 51 ms
11,896 KB
testcase_19 AC 67 ms
13,196 KB
testcase_20 AC 61 ms
13,324 KB
testcase_21 AC 73 ms
13,692 KB
testcase_22 AC 15 ms
7,824 KB
testcase_23 AC 15 ms
7,800 KB
testcase_24 AC 132 ms
19,776 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki1090
n,d=map(int,input().split())
a=list(map(int,input().split()))
res=[0]
x=0
for i in a:
 x+=i
 res.append(max(x,res[-1]+d))
print(*res)
0