結果

問題 No.246 質問と回答
ユーザー finefine
提出日時 2016-03-10 23:50:00
言語 Ruby
(3.3.0)
結果
AC  
実行時間 122 ms / 2,000 ms
コード長 205 bytes
コンパイル時間 158 ms
コンパイル使用メモリ 11,460 KB
実行使用メモリ 31,432 KB
平均クエリ数 30.90
最終ジャッジ日時 2023-09-23 20:13:31
合計ジャッジ時間 6,094 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
30,912 KB
testcase_01 AC 117 ms
30,912 KB
testcase_02 AC 114 ms
31,388 KB
testcase_03 AC 114 ms
31,264 KB
testcase_04 AC 115 ms
31,176 KB
testcase_05 AC 113 ms
31,112 KB
testcase_06 AC 113 ms
31,364 KB
testcase_07 AC 113 ms
31,396 KB
testcase_08 AC 116 ms
30,848 KB
testcase_09 AC 116 ms
30,836 KB
testcase_10 AC 120 ms
31,280 KB
testcase_11 AC 120 ms
31,160 KB
testcase_12 AC 120 ms
31,364 KB
testcase_13 AC 120 ms
31,272 KB
testcase_14 AC 120 ms
30,864 KB
testcase_15 AC 122 ms
30,740 KB
testcase_16 AC 118 ms
30,708 KB
testcase_17 AC 119 ms
31,432 KB
testcase_18 AC 121 ms
31,040 KB
testcase_19 AC 114 ms
31,284 KB
testcase_20 AC 116 ms
31,416 KB
testcase_21 AC 117 ms
31,044 KB
testcase_22 AC 116 ms
30,824 KB
testcase_23 AC 120 ms
31,400 KB
testcase_24 AC 117 ms
30,880 KB
testcase_25 AC 114 ms
31,360 KB
testcase_26 AC 117 ms
31,232 KB
testcase_27 AC 119 ms
30,924 KB
testcase_28 AC 111 ms
31,356 KB
testcase_29 AC 108 ms
31,056 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

l = 1
r = 10 ** 9
while l != (mid = (l + r) / 2)
    puts "? #{mid}"
    STDOUT.flush
    case gets.to_i
        when 1
        l = mid
        when 0
        r = mid
    end
end
puts "! #{l}"
STDOUT.flush
0