結果

問題 No.253 ロウソクの長さ
ユーザー finefine
提出日時 2016-04-05 01:13:14
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 273 bytes
コンパイル時間 52 ms
コンパイル使用メモリ 11,248 KB
実行使用メモリ 31,480 KB
平均クエリ数 27.00
最終ジャッジ日時 2023-09-23 10:16:46
合計ジャッジ時間 9,085 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
31,440 KB
testcase_01 AC 105 ms
30,964 KB
testcase_02 AC 104 ms
31,196 KB
testcase_03 AC 109 ms
31,160 KB
testcase_04 AC 112 ms
31,336 KB
testcase_05 AC 109 ms
30,848 KB
testcase_06 AC 105 ms
31,208 KB
testcase_07 AC 104 ms
30,676 KB
testcase_08 AC 105 ms
30,672 KB
testcase_09 WA -
testcase_10 AC 107 ms
30,972 KB
testcase_11 AC 105 ms
30,752 KB
testcase_12 AC 110 ms
30,748 KB
testcase_13 AC 110 ms
30,804 KB
testcase_14 WA -
testcase_15 AC 103 ms
30,980 KB
testcase_16 AC 106 ms
31,392 KB
testcase_17 AC 104 ms
30,780 KB
testcase_18 AC 104 ms
31,276 KB
testcase_19 WA -
testcase_20 AC 104 ms
31,444 KB
testcase_21 AC 105 ms
31,068 KB
testcase_22 WA -
testcase_23 AC 104 ms
30,912 KB
testcase_24 AC 104 ms
31,184 KB
testcase_25 AC 105 ms
31,312 KB
testcase_26 AC 104 ms
30,728 KB
testcase_27 AC 105 ms
30,852 KB
testcase_28 AC 105 ms
31,204 KB
testcase_29 AC 105 ms
30,684 KB
testcase_30 AC 104 ms
31,480 KB
testcase_31 AC 104 ms
30,748 KB
testcase_32 AC 105 ms
30,744 KB
testcase_33 TLE -
testcase_34 -- -
testcase_35 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

l = 10
r = 1000000000
c = 0
loop{
    y = (l + r) / 2
    puts "? #{[y - c,0].max}"
    STDOUT.flush
    ans = gets.to_i
    if ans == 0
        puts "! #{y}"
        STDOUT.flush
        break
    elsif ans > 0
        l = y
    else
        r = y
    end
    c += 1
    }
0