結果

問題 No.1090 ソーシャルディスタンス / Social Distance
ユーザー miya145592
提出日時 2023-05-17 00:44:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 92 ms / 2,000 ms
コード長 200 bytes
コンパイル時間 411 ms
コンパイル使用メモリ 81,844 KB
実行使用メモリ 99,512 KB
最終ジャッジ日時 2024-12-14 22:08:57
合計ジャッジ時間 3,734 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

N, D = map(int, input().split())
A = list(map(int, input().split()))
ans = [0]
x = 0
for a in A:
    x+=a
    if x-ans[-1]<D:
        ans.append(ans[-1]+D)
    else:
        ans.append(x)
print(*ans)
0