結果

問題 No.1090 ソーシャルディスタンス / Social Distance
ユーザー zyxwzyxw
提出日時 2021-02-04 10:23:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 117 ms / 2,000 ms
コード長 188 bytes
コンパイル時間 289 ms
コンパイル使用メモリ 87,132 KB
実行使用メモリ 100,616 KB
最終ジャッジ日時 2023-09-13 05:22:05
合計ジャッジ時間 4,375 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,404 KB
testcase_01 AC 67 ms
71,164 KB
testcase_02 AC 105 ms
91,644 KB
testcase_03 AC 81 ms
76,960 KB
testcase_04 AC 105 ms
94,560 KB
testcase_05 AC 80 ms
76,872 KB
testcase_06 AC 116 ms
97,660 KB
testcase_07 AC 94 ms
86,560 KB
testcase_08 AC 112 ms
100,260 KB
testcase_09 AC 95 ms
87,124 KB
testcase_10 AC 101 ms
90,360 KB
testcase_11 AC 113 ms
100,600 KB
testcase_12 AC 97 ms
87,708 KB
testcase_13 AC 97 ms
87,708 KB
testcase_14 AC 112 ms
97,612 KB
testcase_15 AC 102 ms
92,348 KB
testcase_16 AC 91 ms
82,004 KB
testcase_17 AC 78 ms
76,752 KB
testcase_18 AC 90 ms
82,940 KB
testcase_19 AC 97 ms
85,748 KB
testcase_20 AC 98 ms
84,376 KB
testcase_21 AC 101 ms
88,312 KB
testcase_22 AC 70 ms
71,288 KB
testcase_23 AC 70 ms
71,304 KB
testcase_24 AC 117 ms
100,616 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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