結果

問題 No.1090 ソーシャルディスタンス / Social Distance
ユーザー Omura ShunsukeOmura Shunsuke
提出日時 2020-06-24 18:19:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 213 bytes
コンパイル時間 263 ms
コンパイル使用メモリ 87,164 KB
実行使用メモリ 101,684 KB
最終ジャッジ日時 2023-09-16 21:09:58
合計ジャッジ時間 4,510 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
71,520 KB
testcase_01 AC 77 ms
71,396 KB
testcase_02 AC 113 ms
92,168 KB
testcase_03 AC 88 ms
76,728 KB
testcase_04 AC 116 ms
94,860 KB
testcase_05 AC 88 ms
76,904 KB
testcase_06 AC 118 ms
98,360 KB
testcase_07 AC 102 ms
86,840 KB
testcase_08 AC 121 ms
100,980 KB
testcase_09 AC 101 ms
87,436 KB
testcase_10 AC 106 ms
90,708 KB
testcase_11 AC 123 ms
101,380 KB
testcase_12 AC 103 ms
88,228 KB
testcase_13 AC 105 ms
88,400 KB
testcase_14 AC 117 ms
98,300 KB
testcase_15 AC 110 ms
92,772 KB
testcase_16 AC 98 ms
82,200 KB
testcase_17 AC 87 ms
76,672 KB
testcase_18 AC 100 ms
83,228 KB
testcase_19 AC 101 ms
86,112 KB
testcase_20 AC 99 ms
84,716 KB
testcase_21 AC 105 ms
88,556 KB
testcase_22 AC 73 ms
71,344 KB
testcase_23 AC 73 ms
71,292 KB
testcase_24 AC 124 ms
101,684 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

#print(a)
b=[0]
for i in range(1,N):
    b.append(b[-1]+a[i])
#print(b)
for i in range(1,N):
    if b[i]-b[i-1]<D:
        b[i]=b[i-1]+D
print(*b)
0