結果

問題 No.1090 ソーシャルディスタンス / Social Distance
ユーザー 67oYG9nh2YMmIci67oYG9nh2YMmIci
提出日時 2020-07-13 13:49:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 154 ms / 2,000 ms
コード長 204 bytes
コンパイル時間 232 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 20,844 KB
最終ジャッジ日時 2024-04-25 03:14:14
合計ジャッジ時間 3,789 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 24 ms
10,880 KB
testcase_01 AC 24 ms
10,752 KB
testcase_02 AC 123 ms
17,172 KB
testcase_03 AC 37 ms
11,648 KB
testcase_04 AC 120 ms
17,328 KB
testcase_05 AC 34 ms
11,392 KB
testcase_06 AC 137 ms
19,008 KB
testcase_07 AC 96 ms
15,648 KB
testcase_08 AC 154 ms
19,148 KB
testcase_09 AC 95 ms
15,712 KB
testcase_10 AC 115 ms
16,980 KB
testcase_11 AC 147 ms
19,712 KB
testcase_12 AC 96 ms
15,808 KB
testcase_13 AC 96 ms
15,572 KB
testcase_14 AC 150 ms
18,604 KB
testcase_15 AC 122 ms
17,156 KB
testcase_16 AC 68 ms
13,908 KB
testcase_17 AC 30 ms
11,008 KB
testcase_18 AC 68 ms
14,044 KB
testcase_19 AC 90 ms
15,404 KB
testcase_20 AC 79 ms
15,408 KB
testcase_21 AC 97 ms
15,808 KB
testcase_22 AC 26 ms
10,880 KB
testcase_23 AC 25 ms
10,752 KB
testcase_24 AC 143 ms
20,844 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,D=map(int, input().split())
a=[int(i) for i in input().split()]
b=[0]
for i in range(0,len(a)):
    b.append(a[i]+b[i])
for i in range(1,len(b)):
    if b[i]-b[i-1] < D:
        b[i]=b[i-1]+D

print(*b)
0