結果

問題 No.1090 ソーシャルディスタンス / Social Distance
ユーザー kozykozy
提出日時 2020-07-21 16:06:27
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 138 ms / 2,000 ms
コード長 187 bytes
コンパイル時間 178 ms
コンパイル使用メモリ 10,588 KB
実行使用メモリ 23,556 KB
最終ジャッジ日時 2023-08-28 16:42:30
合計ジャッジ時間 3,750 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,844 KB
testcase_01 AC 14 ms
7,788 KB
testcase_02 AC 95 ms
17,732 KB
testcase_03 AC 26 ms
9,456 KB
testcase_04 AC 110 ms
19,176 KB
testcase_05 AC 23 ms
9,016 KB
testcase_06 AC 125 ms
21,660 KB
testcase_07 AC 72 ms
14,920 KB
testcase_08 AC 131 ms
22,176 KB
testcase_09 AC 73 ms
15,284 KB
testcase_10 AC 93 ms
17,164 KB
testcase_11 AC 138 ms
22,996 KB
testcase_12 AC 81 ms
15,744 KB
testcase_13 AC 79 ms
15,744 KB
testcase_14 AC 125 ms
21,352 KB
testcase_15 AC 102 ms
18,592 KB
testcase_16 AC 50 ms
12,676 KB
testcase_17 AC 18 ms
8,320 KB
testcase_18 AC 54 ms
12,908 KB
testcase_19 AC 68 ms
14,912 KB
testcase_20 AC 62 ms
13,844 KB
testcase_21 AC 80 ms
15,688 KB
testcase_22 AC 15 ms
7,920 KB
testcase_23 AC 15 ms
7,904 KB
testcase_24 AC 136 ms
23,556 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,D=map(int,input().split())
B=list(map(int,input().split()))
B.insert(0,0)
A=[0]*N
s=0
for i in range(1,N):
  s+=B[i]
  A[i]=s
  A[i]=max(A[i-1]+D,A[i])
print(" ".join(list(map(str,A))))
0