結果

問題 No.1478 Simple Sugoroku
ユーザー あかりきあかりき
提出日時 2021-04-17 15:45:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 194 bytes
コンパイル時間 631 ms
コンパイル使用メモリ 86,888 KB
実行使用メモリ 98,192 KB
最終ジャッジ日時 2023-09-17 00:58:08
合計ジャッジ時間 6,235 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,224 KB
testcase_01 AC 71 ms
71,092 KB
testcase_02 AC 70 ms
71,484 KB
testcase_03 AC 71 ms
71,364 KB
testcase_04 AC 72 ms
71,432 KB
testcase_05 AC 72 ms
71,256 KB
testcase_06 AC 70 ms
71,396 KB
testcase_07 AC 70 ms
71,336 KB
testcase_08 AC 70 ms
71,392 KB
testcase_09 AC 71 ms
71,096 KB
testcase_10 AC 72 ms
71,252 KB
testcase_11 AC 72 ms
71,260 KB
testcase_12 AC 71 ms
71,488 KB
testcase_13 AC 124 ms
97,596 KB
testcase_14 AC 106 ms
97,568 KB
testcase_15 AC 106 ms
97,836 KB
testcase_16 AC 105 ms
97,700 KB
testcase_17 AC 106 ms
97,772 KB
testcase_18 AC 103 ms
97,796 KB
testcase_19 AC 105 ms
97,844 KB
testcase_20 AC 104 ms
97,724 KB
testcase_21 AC 107 ms
97,864 KB
testcase_22 AC 105 ms
97,996 KB
testcase_23 AC 103 ms
97,540 KB
testcase_24 AC 103 ms
97,856 KB
testcase_25 AC 105 ms
97,856 KB
testcase_26 AC 104 ms
98,192 KB
testcase_27 AC 104 ms
97,736 KB
testcase_28 AC 101 ms
96,376 KB
testcase_29 AC 102 ms
97,132 KB
testcase_30 AC 102 ms
97,036 KB
testcase_31 AC 102 ms
96,912 KB
testcase_32 AC 101 ms
96,940 KB
testcase_33 AC 102 ms
97,284 KB
testcase_34 AC 102 ms
97,192 KB
testcase_35 AC 103 ms
97,312 KB
testcase_36 AC 103 ms
97,296 KB
testcase_37 AC 104 ms
97,484 KB
testcase_38 AC 103 ms
97,632 KB
testcase_39 AC 103 ms
97,232 KB
testcase_40 AC 103 ms
97,408 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m=map(int,input().split())
b=list(map(int,input().split()))

ans=[n-1]
ct=0
for i in range(m-1,-1,-1):
  ct+=b[-1]-b[i]
  x=m/(m-i)+ct/(m-i)
  ans.append(x+(n-b[-1])+(b[0]-1))

print(min(ans))
0