結果

問題 No.1090 ソーシャルディスタンス / Social Distance
ユーザー MaboyMaboy
提出日時 2021-09-28 17:46:31
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 118 ms / 2,000 ms
コード長 219 bytes
コンパイル時間 118 ms
コンパイル使用メモリ 10,692 KB
実行使用メモリ 24,488 KB
最終ジャッジ日時 2023-09-22 08:56:54
合計ジャッジ時間 4,464 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,868 KB
testcase_01 AC 14 ms
7,968 KB
testcase_02 AC 89 ms
18,024 KB
testcase_03 AC 23 ms
9,560 KB
testcase_04 AC 88 ms
19,164 KB
testcase_05 AC 21 ms
9,168 KB
testcase_06 AC 101 ms
21,664 KB
testcase_07 AC 64 ms
14,828 KB
testcase_08 AC 118 ms
22,604 KB
testcase_09 AC 67 ms
15,208 KB
testcase_10 AC 81 ms
17,144 KB
testcase_11 AC 108 ms
23,044 KB
testcase_12 AC 70 ms
15,768 KB
testcase_13 AC 70 ms
15,768 KB
testcase_14 AC 110 ms
21,604 KB
testcase_15 AC 90 ms
18,540 KB
testcase_16 AC 47 ms
12,724 KB
testcase_17 AC 17 ms
8,256 KB
testcase_18 AC 45 ms
12,944 KB
testcase_19 AC 62 ms
14,852 KB
testcase_20 AC 56 ms
14,112 KB
testcase_21 AC 69 ms
15,688 KB
testcase_22 AC 15 ms
7,844 KB
testcase_23 AC 14 ms
7,868 KB
testcase_24 AC 105 ms
24,488 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,d = map(int,input().split())
a = list(map(int,input().split()))
l = [0]
for i in range(n-1):
    l.append(l[i]+a[i])
for i in range(1,n):
    if l[i] - l[i-1] < d:
        l[i] = l[i-1] + d
print(" ".join(map(str,l)))
0