結果

問題 No.246 質問と回答
ユーザー maimai
提出日時 2016-06-01 12:20:22
言語 Ruby
(3.3.0)
結果
AC  
実行時間 118 ms / 2,000 ms
コード長 159 bytes
コンパイル時間 320 ms
コンパイル使用メモリ 11,308 KB
実行使用メモリ 31,328 KB
平均クエリ数 30.90
最終ジャッジ日時 2023-09-23 20:15:52
合計ジャッジ時間 6,015 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
30,576 KB
testcase_01 AC 110 ms
30,644 KB
testcase_02 AC 113 ms
30,992 KB
testcase_03 AC 111 ms
30,724 KB
testcase_04 AC 110 ms
30,684 KB
testcase_05 AC 111 ms
30,628 KB
testcase_06 AC 110 ms
31,136 KB
testcase_07 AC 111 ms
31,216 KB
testcase_08 AC 112 ms
31,096 KB
testcase_09 AC 112 ms
31,328 KB
testcase_10 AC 109 ms
30,684 KB
testcase_11 AC 112 ms
31,128 KB
testcase_12 AC 114 ms
30,488 KB
testcase_13 AC 109 ms
30,884 KB
testcase_14 AC 109 ms
30,984 KB
testcase_15 AC 112 ms
30,692 KB
testcase_16 AC 109 ms
30,756 KB
testcase_17 AC 109 ms
30,896 KB
testcase_18 AC 110 ms
31,184 KB
testcase_19 AC 110 ms
31,224 KB
testcase_20 AC 110 ms
30,700 KB
testcase_21 AC 110 ms
30,916 KB
testcase_22 AC 118 ms
31,148 KB
testcase_23 AC 118 ms
30,992 KB
testcase_24 AC 116 ms
30,896 KB
testcase_25 AC 111 ms
31,064 KB
testcase_26 AC 109 ms
31,120 KB
testcase_27 AC 108 ms
30,672 KB
testcase_28 AC 114 ms
31,176 KB
testcase_29 AC 109 ms
30,760 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

l=1;h=10**9
while h-l>0
    m=(h+l+1)/2;
    puts "? "+m.to_s;STDOUT.flush
    if 0==gets.to_i
        h=m-1
    else
        l=m
    end
end
puts "! "+l.to_s
0