結果

問題 No.1090 ソーシャルディスタンス / Social Distance
ユーザー kikagekikage
提出日時 2021-08-16 18:29:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 249 ms / 2,000 ms
コード長 241 bytes
コンパイル時間 107 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 20,720 KB
最終ジャッジ日時 2024-04-17 22:04:13
合計ジャッジ時間 4,958 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
10,752 KB
testcase_01 AC 32 ms
10,752 KB
testcase_02 AC 174 ms
16,420 KB
testcase_03 AC 52 ms
11,520 KB
testcase_04 AC 194 ms
17,336 KB
testcase_05 AC 45 ms
11,264 KB
testcase_06 AC 233 ms
18,888 KB
testcase_07 AC 130 ms
14,916 KB
testcase_08 AC 232 ms
19,064 KB
testcase_09 AC 137 ms
15,076 KB
testcase_10 AC 167 ms
16,408 KB
testcase_11 AC 248 ms
19,456 KB
testcase_12 AC 145 ms
15,576 KB
testcase_13 AC 141 ms
15,308 KB
testcase_14 AC 228 ms
18,588 KB
testcase_15 AC 186 ms
17,056 KB
testcase_16 AC 98 ms
13,312 KB
testcase_17 AC 36 ms
11,008 KB
testcase_18 AC 100 ms
13,544 KB
testcase_19 AC 129 ms
14,744 KB
testcase_20 AC 120 ms
14,616 KB
testcase_21 AC 142 ms
15,444 KB
testcase_22 AC 31 ms
10,752 KB
testcase_23 AC 31 ms
10,752 KB
testcase_24 AC 249 ms
20,720 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

print("0",end="") #0番
for i in range(1,N):
    x[i]=max(x[i-1]+D,x[i])
    print(" "+str(x[i]),end="") #1~N-1番
print("")
0