結果

問題 No.246 質問と回答
ユーザー hadrorihadrori
提出日時 2015-07-26 22:37:08
言語 Ruby
(3.3.0)
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 152 bytes
コンパイル時間 52 ms
コンパイル使用メモリ 11,268 KB
実行使用メモリ 31,444 KB
平均クエリ数 30.90
最終ジャッジ日時 2023-09-23 20:03:50
合計ジャッジ時間 5,373 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
30,976 KB
testcase_01 AC 117 ms
30,892 KB
testcase_02 AC 117 ms
30,588 KB
testcase_03 AC 115 ms
30,872 KB
testcase_04 AC 116 ms
30,804 KB
testcase_05 AC 114 ms
31,380 KB
testcase_06 AC 115 ms
30,916 KB
testcase_07 AC 115 ms
31,172 KB
testcase_08 AC 116 ms
30,840 KB
testcase_09 AC 114 ms
30,932 KB
testcase_10 AC 112 ms
30,716 KB
testcase_11 AC 114 ms
30,804 KB
testcase_12 AC 113 ms
30,792 KB
testcase_13 AC 114 ms
30,760 KB
testcase_14 AC 116 ms
31,140 KB
testcase_15 AC 116 ms
31,340 KB
testcase_16 AC 116 ms
31,060 KB
testcase_17 AC 114 ms
30,816 KB
testcase_18 AC 116 ms
30,852 KB
testcase_19 AC 117 ms
30,904 KB
testcase_20 AC 117 ms
31,444 KB
testcase_21 AC 115 ms
30,772 KB
testcase_22 AC 117 ms
30,512 KB
testcase_23 AC 117 ms
31,268 KB
testcase_24 AC 115 ms
31,336 KB
testcase_25 AC 119 ms
30,732 KB
testcase_26 AC 119 ms
30,788 KB
testcase_27 AC 118 ms
31,216 KB
testcase_28 AC 116 ms
31,232 KB
testcase_29 AC 115 ms
30,876 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

lb=1
ub=1000000001
while ub-lb>1
  m=(lb+ub)/2
  puts '? '+m.to_s
  STDOUT.flush
  if gets.to_i==1
    lb=m
  else
    ub=m
  end
end
puts '! '+lb.to_s
0