結果

問題 No.1090 ソーシャルディスタンス / Social Distance
ユーザー pluto77pluto77
提出日時 2020-06-24 16:40:44
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 136 ms / 2,000 ms
コード長 201 bytes
コンパイル時間 207 ms
コンパイル使用メモリ 10,632 KB
実行使用メモリ 19,636 KB
最終ジャッジ日時 2023-09-16 21:07:21
合計ジャッジ時間 3,869 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,884 KB
testcase_01 AC 14 ms
7,848 KB
testcase_02 AC 99 ms
14,912 KB
testcase_03 AC 25 ms
9,352 KB
testcase_04 AC 102 ms
15,896 KB
testcase_05 AC 22 ms
9,008 KB
testcase_06 AC 123 ms
17,680 KB
testcase_07 AC 73 ms
13,044 KB
testcase_08 AC 136 ms
18,184 KB
testcase_09 AC 80 ms
13,880 KB
testcase_10 AC 96 ms
15,476 KB
testcase_11 AC 129 ms
18,444 KB
testcase_12 AC 81 ms
13,916 KB
testcase_13 AC 78 ms
13,780 KB
testcase_14 AC 130 ms
17,308 KB
testcase_15 AC 106 ms
15,520 KB
testcase_16 AC 55 ms
12,272 KB
testcase_17 AC 18 ms
8,460 KB
testcase_18 AC 54 ms
12,060 KB
testcase_19 AC 73 ms
13,856 KB
testcase_20 AC 67 ms
13,600 KB
testcase_21 AC 83 ms
13,900 KB
testcase_22 AC 15 ms
7,852 KB
testcase_23 AC 15 ms
7,840 KB
testcase_24 AC 129 ms
19,636 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki1090
n,d=map(int,input().split())
a=list(map(int,input().split()))
l=[0]*n
b=[0]
b.extend(a)
for i in range(n):
 l[i]=l[i-1]+b[i]
for i in range(1,n):
 if l[i]-l[i-1]<d:
  l[i]=l[i-1]+d
print(*l)
0