結果

問題 No.1090 ソーシャルディスタンス / Social Distance
ユーザー DrDrpilot
提出日時 2022-04-13 14:27:12
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 146 ms / 2,000 ms
コード長 195 bytes
コンパイル時間 667 ms
コンパイル使用メモリ 12,288 KB
実行使用メモリ 20,696 KB
最終ジャッジ日時 2024-12-23 12:23:43
合計ジャッジ時間 4,013 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

n,d=map(int,input().split())
a=[0]+list(map(int,input().split()))
from itertools import accumulate
b=list(accumulate(a))
for i in range(1,n):
    if b[i]-b[i-1]<d:
        b[i]=b[i-1]+d
print(*b)
0