結果

問題 No.1478 Simple Sugoroku
ユーザー toyuzukotoyuzuko
提出日時 2021-04-17 18:00:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 105 ms / 2,000 ms
コード長 306 bytes
コンパイル時間 269 ms
コンパイル使用メモリ 87,036 KB
実行使用メモリ 99,672 KB
最終ジャッジ日時 2023-09-17 03:24:57
合計ジャッジ時間 6,193 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
71,308 KB
testcase_01 AC 62 ms
71,628 KB
testcase_02 AC 59 ms
71,356 KB
testcase_03 AC 63 ms
71,392 KB
testcase_04 AC 67 ms
71,256 KB
testcase_05 AC 67 ms
71,520 KB
testcase_06 AC 70 ms
71,428 KB
testcase_07 AC 58 ms
71,180 KB
testcase_08 AC 62 ms
71,652 KB
testcase_09 AC 62 ms
71,432 KB
testcase_10 AC 63 ms
71,312 KB
testcase_11 AC 60 ms
71,356 KB
testcase_12 AC 61 ms
71,372 KB
testcase_13 AC 104 ms
99,596 KB
testcase_14 AC 100 ms
99,488 KB
testcase_15 AC 105 ms
99,520 KB
testcase_16 AC 100 ms
99,504 KB
testcase_17 AC 100 ms
99,656 KB
testcase_18 AC 94 ms
99,388 KB
testcase_19 AC 102 ms
99,384 KB
testcase_20 AC 93 ms
99,608 KB
testcase_21 AC 95 ms
99,544 KB
testcase_22 AC 94 ms
99,632 KB
testcase_23 AC 94 ms
99,576 KB
testcase_24 AC 92 ms
99,336 KB
testcase_25 AC 92 ms
99,672 KB
testcase_26 AC 91 ms
99,664 KB
testcase_27 AC 94 ms
99,652 KB
testcase_28 AC 92 ms
99,140 KB
testcase_29 AC 89 ms
98,712 KB
testcase_30 AC 91 ms
98,648 KB
testcase_31 AC 90 ms
98,764 KB
testcase_32 AC 89 ms
98,720 KB
testcase_33 AC 93 ms
98,992 KB
testcase_34 AC 90 ms
98,988 KB
testcase_35 AC 92 ms
99,024 KB
testcase_36 AC 89 ms
99,048 KB
testcase_37 AC 90 ms
99,148 KB
testcase_38 AC 91 ms
99,168 KB
testcase_39 AC 90 ms
99,220 KB
testcase_40 AC 91 ms
99,292 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
B = list(map(int, input().split()))

cum = [0]

for i in range(M):
    cum.append(cum[-1] + B[i])

res = N - 1

for i in range(M - 1):
    cnt = B[0] - 1
    cnt += 1 / (1 - (i + 1) / M)
    cnt += N - (cum[M] - cum[i + 1]) / (M - i - 1)
    res = min(res, cnt)

print(res)
0