結果

問題 No.1478 Simple Sugoroku
ユーザー NatsubiSoganNatsubiSogan
提出日時 2021-04-17 18:59:57
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 159 ms / 2,000 ms
コード長 259 bytes
コンパイル時間 308 ms
コンパイル使用メモリ 10,712 KB
実行使用メモリ 19,764 KB
最終ジャッジ日時 2023-09-17 04:30:34
合計ジャッジ時間 6,647 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,772 KB
testcase_01 AC 16 ms
7,776 KB
testcase_02 AC 15 ms
7,792 KB
testcase_03 AC 16 ms
7,760 KB
testcase_04 AC 15 ms
7,768 KB
testcase_05 AC 15 ms
7,820 KB
testcase_06 AC 16 ms
7,888 KB
testcase_07 AC 15 ms
7,776 KB
testcase_08 AC 16 ms
7,700 KB
testcase_09 AC 15 ms
7,728 KB
testcase_10 AC 15 ms
7,936 KB
testcase_11 AC 15 ms
7,780 KB
testcase_12 AC 15 ms
7,848 KB
testcase_13 AC 155 ms
18,988 KB
testcase_14 AC 151 ms
19,140 KB
testcase_15 AC 155 ms
19,096 KB
testcase_16 AC 157 ms
18,804 KB
testcase_17 AC 153 ms
18,972 KB
testcase_18 AC 155 ms
18,796 KB
testcase_19 AC 158 ms
18,800 KB
testcase_20 AC 156 ms
18,832 KB
testcase_21 AC 157 ms
18,996 KB
testcase_22 AC 156 ms
18,840 KB
testcase_23 AC 155 ms
18,804 KB
testcase_24 AC 153 ms
18,828 KB
testcase_25 AC 157 ms
18,808 KB
testcase_26 AC 154 ms
18,800 KB
testcase_27 AC 157 ms
18,804 KB
testcase_28 AC 154 ms
19,556 KB
testcase_29 AC 152 ms
19,628 KB
testcase_30 AC 152 ms
19,624 KB
testcase_31 AC 153 ms
19,596 KB
testcase_32 AC 153 ms
19,516 KB
testcase_33 AC 149 ms
19,656 KB
testcase_34 AC 157 ms
19,764 KB
testcase_35 AC 152 ms
19,656 KB
testcase_36 AC 156 ms
19,700 KB
testcase_37 AC 157 ms
18,732 KB
testcase_38 AC 159 ms
18,808 KB
testcase_39 AC 159 ms
18,936 KB
testcase_40 AC 156 ms
18,912 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = map(int, input().split())
b = list(map(int, input().split()))
l = [0]
for i in range(m):
    l.append(l[-1] + b[i])
ans = n - 1
for i in range(m - 1):
    ans = min(ans, b[0] - 1 + 1 / (1 - (i + 1) / m) + n - (l[m] - l[i + 1]) / (m - i - 1))
print(ans)
0