結果

問題 No.1090 ソーシャルディスタンス / Social Distance
ユーザー 👑 KazunKazun
提出日時 2020-06-25 23:48:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 149 ms / 2,000 ms
コード長 295 bytes
コンパイル時間 311 ms
コンパイル使用メモリ 86,692 KB
実行使用メモリ 101,508 KB
最終ジャッジ日時 2023-09-16 23:12:05
合計ジャッジ時間 5,122 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
71,384 KB
testcase_01 AC 77 ms
71,460 KB
testcase_02 AC 131 ms
92,280 KB
testcase_03 AC 106 ms
78,008 KB
testcase_04 AC 138 ms
95,148 KB
testcase_05 AC 103 ms
76,840 KB
testcase_06 AC 145 ms
98,364 KB
testcase_07 AC 125 ms
87,188 KB
testcase_08 AC 144 ms
100,796 KB
testcase_09 AC 124 ms
87,432 KB
testcase_10 AC 130 ms
91,160 KB
testcase_11 AC 149 ms
101,508 KB
testcase_12 AC 126 ms
88,072 KB
testcase_13 AC 123 ms
87,984 KB
testcase_14 AC 138 ms
98,044 KB
testcase_15 AC 134 ms
92,756 KB
testcase_16 AC 116 ms
82,724 KB
testcase_17 AC 101 ms
76,856 KB
testcase_18 AC 114 ms
83,196 KB
testcase_19 AC 122 ms
86,640 KB
testcase_20 AC 119 ms
85,344 KB
testcase_21 AC 126 ms
88,256 KB
testcase_22 AC 78 ms
71,476 KB
testcase_23 AC 78 ms
71,304 KB
testcase_24 AC 144 ms
100,052 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,D=map(int,input().split())
A=["*",0]+list(map(int,input().split()))

T=["*",0]
for i in range(2,N+1):
    T.append(T[-1]+A[i])
    
for i in range(2,N+1):
    if T[i-1]+D>T[i]:
        T[i]=T[i-1]+D

for i in range(1,N+1):
    print(T[i],end="")
    if i!=N:
        print("",end=" ")
print()
0