結果

問題 No.1478 Simple Sugoroku
ユーザー yuusanlondonyuusanlondon
提出日時 2021-04-16 20:56:37
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 103 ms / 2,000 ms
コード長 343 bytes
コンパイル時間 813 ms
コンパイル使用メモリ 86,784 KB
実行使用メモリ 98,644 KB
最終ジャッジ日時 2023-09-15 22:19:57
合計ジャッジ時間 6,096 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,292 KB
testcase_01 AC 75 ms
71,076 KB
testcase_02 AC 77 ms
71,380 KB
testcase_03 AC 75 ms
71,036 KB
testcase_04 AC 75 ms
71,204 KB
testcase_05 AC 75 ms
71,360 KB
testcase_06 AC 73 ms
71,200 KB
testcase_07 AC 75 ms
71,148 KB
testcase_08 AC 76 ms
71,312 KB
testcase_09 AC 74 ms
71,296 KB
testcase_10 AC 74 ms
71,248 KB
testcase_11 AC 74 ms
71,260 KB
testcase_12 AC 74 ms
71,220 KB
testcase_13 AC 103 ms
98,416 KB
testcase_14 AC 99 ms
98,084 KB
testcase_15 AC 101 ms
98,416 KB
testcase_16 AC 99 ms
98,568 KB
testcase_17 AC 100 ms
98,308 KB
testcase_18 AC 99 ms
98,236 KB
testcase_19 AC 99 ms
98,644 KB
testcase_20 AC 99 ms
98,348 KB
testcase_21 AC 99 ms
98,252 KB
testcase_22 AC 98 ms
98,492 KB
testcase_23 AC 99 ms
98,400 KB
testcase_24 AC 99 ms
98,520 KB
testcase_25 AC 102 ms
98,396 KB
testcase_26 AC 101 ms
98,516 KB
testcase_27 AC 102 ms
98,400 KB
testcase_28 AC 98 ms
96,944 KB
testcase_29 AC 101 ms
97,184 KB
testcase_30 AC 100 ms
97,196 KB
testcase_31 AC 100 ms
97,440 KB
testcase_32 AC 101 ms
97,520 KB
testcase_33 AC 100 ms
97,564 KB
testcase_34 AC 99 ms
97,528 KB
testcase_35 AC 100 ms
97,552 KB
testcase_36 AC 98 ms
97,568 KB
testcase_37 AC 100 ms
98,016 KB
testcase_38 AC 99 ms
97,964 KB
testcase_39 AC 99 ms
97,904 KB
testcase_40 AC 100 ms
97,960 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import os,io,heapq
input=io.BytesIO(os.read(0,os.fstat(0).st_size)).readline
n,m=map(int,input().split())
a=list(map(int,input().split()))
b=[]
for i in range(m):
  b.append(n-a[i])
currsum=0
flag=0
for i in range(m-1,-1,-1):
  if (currsum+m)<=(m-i-1)*b[i]:
    print(a[0]-1+(currsum+m)/(m-i-1))
    exit()
  else:
    currsum+=b[i]
print(n-1)
0