結果

問題 No.1090 ソーシャルディスタンス / Social Distance
ユーザー match1997match1997
提出日時 2020-09-07 15:10:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 155 ms / 2,000 ms
コード長 245 bytes
コンパイル時間 435 ms
コンパイル使用メモリ 10,640 KB
実行使用メモリ 19,728 KB
最終ジャッジ日時 2023-08-19 16:48:11
合計ジャッジ時間 4,564 ms
ジャッジサーバーID
(参考情報)
judge15 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,780 KB
testcase_01 AC 15 ms
7,836 KB
testcase_02 AC 114 ms
15,168 KB
testcase_03 AC 28 ms
9,064 KB
testcase_04 AC 117 ms
15,932 KB
testcase_05 AC 24 ms
8,784 KB
testcase_06 AC 138 ms
17,700 KB
testcase_07 AC 84 ms
12,936 KB
testcase_08 AC 155 ms
18,300 KB
testcase_09 AC 89 ms
13,036 KB
testcase_10 AC 110 ms
14,616 KB
testcase_11 AC 148 ms
18,428 KB
testcase_12 AC 93 ms
13,580 KB
testcase_13 AC 94 ms
13,656 KB
testcase_14 AC 147 ms
17,324 KB
testcase_15 AC 119 ms
15,252 KB
testcase_16 AC 60 ms
11,440 KB
testcase_17 AC 19 ms
8,200 KB
testcase_18 AC 60 ms
11,536 KB
testcase_19 AC 82 ms
12,928 KB
testcase_20 AC 75 ms
12,712 KB
testcase_21 AC 92 ms
13,364 KB
testcase_22 AC 15 ms
7,936 KB
testcase_23 AC 15 ms
7,772 KB
testcase_24 AC 147 ms
19,728 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, D = map(int,input().split())
*inp,=map(int,input().split())
ichi=[0]
for j in range(N-1):
    ichi.append(ichi[j]+inp[j])
for i in range(N-1):
    if ichi[i+1] - ichi[i] < D:
        ichi[i+1] = ichi[i] + D
for k in ichi:
    print(k,end=' ')
0