結果

問題 No.1478 Simple Sugoroku
ユーザー yuruhiyayuruhiya
提出日時 2021-04-19 21:28:07
言語 Ruby
(3.3.0)
結果
AC  
実行時間 157 ms / 2,000 ms
コード長 171 bytes
コンパイル時間 186 ms
コンパイル使用メモリ 11,164 KB
実行使用メモリ 23,180 KB
最終ジャッジ日時 2023-09-17 08:26:19
合計ジャッジ時間 7,696 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,356 KB
testcase_01 AC 81 ms
15,280 KB
testcase_02 AC 80 ms
15,284 KB
testcase_03 AC 81 ms
15,116 KB
testcase_04 AC 80 ms
15,096 KB
testcase_05 AC 80 ms
15,092 KB
testcase_06 AC 81 ms
15,112 KB
testcase_07 AC 81 ms
15,072 KB
testcase_08 AC 80 ms
15,052 KB
testcase_09 AC 81 ms
15,076 KB
testcase_10 AC 82 ms
15,144 KB
testcase_11 AC 81 ms
15,200 KB
testcase_12 AC 81 ms
15,180 KB
testcase_13 AC 157 ms
23,160 KB
testcase_14 AC 156 ms
23,132 KB
testcase_15 AC 155 ms
23,100 KB
testcase_16 AC 155 ms
22,940 KB
testcase_17 AC 155 ms
23,032 KB
testcase_18 AC 155 ms
23,120 KB
testcase_19 AC 157 ms
23,176 KB
testcase_20 AC 156 ms
23,036 KB
testcase_21 AC 157 ms
23,000 KB
testcase_22 AC 156 ms
23,020 KB
testcase_23 AC 156 ms
22,944 KB
testcase_24 AC 154 ms
23,084 KB
testcase_25 AC 155 ms
23,180 KB
testcase_26 AC 154 ms
23,000 KB
testcase_27 AC 155 ms
23,040 KB
testcase_28 AC 151 ms
22,668 KB
testcase_29 AC 151 ms
22,744 KB
testcase_30 AC 151 ms
22,704 KB
testcase_31 AC 153 ms
22,800 KB
testcase_32 AC 153 ms
22,888 KB
testcase_33 AC 153 ms
22,848 KB
testcase_34 AC 153 ms
22,800 KB
testcase_35 AC 154 ms
22,856 KB
testcase_36 AC 153 ms
22,808 KB
testcase_37 AC 155 ms
22,988 KB
testcase_38 AC 154 ms
23,108 KB
testcase_39 AC 153 ms
23,092 KB
testcase_40 AC 155 ms
23,052 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

(n, m), a = $<.map{ _1.split.map &:to_i }
x = 0
puts [(1..m).map { |i|
  x += a[-1] - a[-i]
  m.to_f / i + 1.0 / i * x
}.min, a[-1] - a[0]].min + (a[0] - 1) + (n - a[-1])
0