結果

問題 No.91 赤、緑、青の石
ユーザー gigurururugigurururu
提出日時 2014-12-07 21:09:27
言語 Ruby
(3.3.0)
結果
RE  
実行時間 -
コード長 98 bytes
コンパイル時間 71 ms
コンパイル使用メモリ 11,316 KB
実行使用メモリ 15,408 KB
最終ジャッジ日時 2023-09-02 10:34:42
合計ジャッジ時間 4,150 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
15,072 KB
testcase_01 AC 79 ms
15,276 KB
testcase_02 AC 80 ms
15,256 KB
testcase_03 AC 79 ms
15,152 KB
testcase_04 AC 79 ms
15,276 KB
testcase_05 AC 82 ms
15,272 KB
testcase_06 AC 79 ms
15,116 KB
testcase_07 AC 81 ms
15,248 KB
testcase_08 AC 81 ms
15,084 KB
testcase_09 AC 82 ms
15,272 KB
testcase_10 AC 81 ms
15,168 KB
testcase_11 AC 82 ms
15,272 KB
testcase_12 AC 83 ms
15,140 KB
testcase_13 AC 81 ms
15,288 KB
testcase_14 AC 82 ms
15,288 KB
testcase_15 AC 80 ms
15,140 KB
testcase_16 RE -
testcase_17 RE -
testcase_18 AC 80 ms
15,076 KB
testcase_19 AC 80 ms
15,212 KB
testcase_20 AC 79 ms
15,212 KB
testcase_21 AC 79 ms
15,140 KB
testcase_22 AC 82 ms
15,068 KB
testcase_23 AC 81 ms
15,324 KB
testcase_24 AC 80 ms
15,112 KB
testcase_25 AC 81 ms
15,004 KB
testcase_26 AC 79 ms
15,140 KB
testcase_27 AC 80 ms
15,228 KB
testcase_28 AC 79 ms
15,136 KB
testcase_29 AC 81 ms
15,072 KB
testcase_30 AC 80 ms
15,268 KB
testcase_31 AC 81 ms
15,136 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a=gets.split.map(&:to_i).sort
p (a[0]..a[2]).bsearch{|i|a.inject(0){|s,j|s+(j-i)/(j>i ?2:1)}<0}-1
0