結果

問題 No.246 質問と回答
ユーザー 🍡yurahuna🍡yurahuna
提出日時 2016-02-24 22:36:18
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 58 ms / 2,000 ms
コード長 263 bytes
コンパイル時間 335 ms
コンパイル使用メモリ 10,644 KB
実行使用メモリ 24,336 KB
平均クエリ数 30.90
最終ジャッジ日時 2023-09-23 20:13:09
合計ジャッジ時間 3,540 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
23,460 KB
testcase_01 AC 52 ms
23,752 KB
testcase_02 AC 51 ms
23,492 KB
testcase_03 AC 50 ms
24,084 KB
testcase_04 AC 51 ms
23,732 KB
testcase_05 AC 51 ms
23,460 KB
testcase_06 AC 51 ms
23,344 KB
testcase_07 AC 52 ms
24,156 KB
testcase_08 AC 50 ms
23,504 KB
testcase_09 AC 50 ms
24,336 KB
testcase_10 AC 51 ms
23,568 KB
testcase_11 AC 49 ms
23,688 KB
testcase_12 AC 49 ms
23,460 KB
testcase_13 AC 50 ms
24,084 KB
testcase_14 AC 49 ms
23,520 KB
testcase_15 AC 51 ms
24,336 KB
testcase_16 AC 49 ms
24,168 KB
testcase_17 AC 50 ms
23,752 KB
testcase_18 AC 50 ms
23,600 KB
testcase_19 AC 50 ms
23,756 KB
testcase_20 AC 49 ms
24,192 KB
testcase_21 AC 49 ms
23,568 KB
testcase_22 AC 51 ms
23,448 KB
testcase_23 AC 49 ms
23,604 KB
testcase_24 AC 49 ms
24,204 KB
testcase_25 AC 50 ms
23,832 KB
testcase_26 AC 51 ms
24,084 KB
testcase_27 AC 49 ms
23,448 KB
testcase_28 AC 52 ms
23,468 KB
testcase_29 AC 49 ms
23,664 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
ok = 1
ng = 10**9 + 1
while abs(ok - ng) > 1:
    mid = (ok + ng) // 2
    print("? %d" % mid)
    sys.stdout.flush()
    query = int(input())
    if query:   # x >= mid
        ok = mid
    else:
        ng = mid
print("! %d" % ok)
sys.stdout.flush()
0