結果

問題 No.1090 ソーシャルディスタンス / Social Distance
ユーザー ssmkzkssmkzk
提出日時 2020-10-04 17:36:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 278 bytes
コンパイル時間 639 ms
コンパイル使用メモリ 10,592 KB
実行使用メモリ 22,040 KB
最終ジャッジ日時 2023-09-26 23:49:45
合計ジャッジ時間 11,231 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
12,100 KB
testcase_01 AC 15 ms
7,756 KB
testcase_02 AC 1,612 ms
14,868 KB
testcase_03 AC 34 ms
9,124 KB
testcase_04 TLE -
testcase_05 AC 25 ms
8,816 KB
testcase_06 TLE -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N, D = map(int,input().split())
l = list(map(int, input().split()))
nowp = 0
suml = 0
ans = "0 "

for l_i in l:
    suml += l_i
    if suml - nowp < D:
        nowp += D
        ans += (str(nowp) + " ")
    else:
        nowp = suml
        ans += (str(nowp) + " ")


print(ans)
0