結果

問題 No.1478 Simple Sugoroku
ユーザー okapinokapin
提出日時 2021-04-16 21:56:41
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 328 bytes
コンパイル時間 88 ms
コンパイル使用メモリ 10,704 KB
実行使用メモリ 19,792 KB
最終ジャッジ日時 2023-09-16 00:31:34
合計ジャッジ時間 3,450 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,808 KB
testcase_01 AC 16 ms
7,748 KB
testcase_02 AC 15 ms
7,908 KB
testcase_03 AC 16 ms
7,804 KB
testcase_04 WA -
testcase_05 AC 16 ms
7,936 KB
testcase_06 AC 16 ms
7,816 KB
testcase_07 AC 15 ms
7,820 KB
testcase_08 AC 15 ms
7,808 KB
testcase_09 AC 16 ms
7,828 KB
testcase_10 AC 16 ms
7,788 KB
testcase_11 AC 15 ms
7,804 KB
testcase_12 AC 15 ms
7,808 KB
testcase_13 AC 45 ms
18,972 KB
testcase_14 AC 45 ms
19,044 KB
testcase_15 AC 45 ms
19,048 KB
testcase_16 AC 46 ms
18,952 KB
testcase_17 AC 45 ms
19,100 KB
testcase_18 AC 46 ms
18,844 KB
testcase_19 AC 45 ms
19,120 KB
testcase_20 AC 46 ms
18,856 KB
testcase_21 AC 46 ms
19,076 KB
testcase_22 AC 46 ms
18,980 KB
testcase_23 AC 45 ms
19,232 KB
testcase_24 AC 45 ms
19,184 KB
testcase_25 AC 45 ms
19,096 KB
testcase_26 AC 45 ms
19,048 KB
testcase_27 AC 45 ms
19,208 KB
testcase_28 AC 45 ms
19,456 KB
testcase_29 AC 45 ms
19,632 KB
testcase_30 AC 46 ms
19,716 KB
testcase_31 AC 46 ms
19,720 KB
testcase_32 AC 46 ms
19,732 KB
testcase_33 AC 46 ms
19,792 KB
testcase_34 AC 46 ms
19,708 KB
testcase_35 AC 45 ms
19,768 KB
testcase_36 AC 46 ms
19,768 KB
testcase_37 AC 48 ms
18,844 KB
testcase_38 AC 47 ms
18,784 KB
testcase_39 AC 47 ms
18,836 KB
testcase_40 AC 47 ms
18,948 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

if m==1:
    ans=n-1
else:
    tmpsum=n-b[-1]
    for i in range(m-2,-1,-1):
        warp=(tmpsum+m)/(m-i-1)
        normal=n-b[i]
        if warp<normal:
            tmp=warp
            break
        else:
            tmpsum+=n-b[i]
    ans=b[0]-1+warp
print(ans)
0