結果

問題 No.246 質問と回答
ユーザー maimai
提出日時 2016-06-01 12:18:15
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 243 bytes
コンパイル時間 376 ms
コンパイル使用メモリ 11,540 KB
実行使用メモリ 31,524 KB
平均クエリ数 30.90
最終ジャッジ日時 2023-09-23 10:45:01
合計ジャッジ時間 5,666 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
30,996 KB
testcase_01 AC 122 ms
31,044 KB
testcase_02 WA -
testcase_03 AC 129 ms
31,188 KB
testcase_04 AC 123 ms
31,112 KB
testcase_05 AC 124 ms
30,904 KB
testcase_06 AC 123 ms
31,524 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 122 ms
31,032 KB
testcase_10 AC 123 ms
31,300 KB
testcase_11 AC 123 ms
31,140 KB
testcase_12 AC 125 ms
31,292 KB
testcase_13 AC 122 ms
30,888 KB
testcase_14 AC 121 ms
30,624 KB
testcase_15 AC 122 ms
30,856 KB
testcase_16 AC 122 ms
31,424 KB
testcase_17 WA -
testcase_18 AC 123 ms
30,992 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 124 ms
31,324 KB
testcase_22 AC 122 ms
31,056 KB
testcase_23 AC 123 ms
30,776 KB
testcase_24 AC 123 ms
31,424 KB
testcase_25 AC 122 ms
31,040 KB
testcase_26 AC 120 ms
31,360 KB
testcase_27 AC 122 ms
31,112 KB
testcase_28 AC 123 ms
30,976 KB
testcase_29 AC 122 ms
30,960 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def simulate(w)
    return  (202>=w) ? 1 : 0
end

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