結果

問題 No.246 質問と回答
ユーザー ant2357ant2357
提出日時 2017-05-14 22:54:13
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 274 bytes
コンパイル時間 70 ms
コンパイル使用メモリ 10,700 KB
実行使用メモリ 24,396 KB
平均クエリ数 31.00
最終ジャッジ日時 2023-09-23 14:02:42
合計ジャッジ時間 3,414 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 52 ms
23,384 KB
testcase_03 AC 54 ms
23,520 KB
testcase_04 AC 52 ms
24,024 KB
testcase_05 AC 53 ms
23,636 KB
testcase_06 WA -
testcase_07 AC 53 ms
24,024 KB
testcase_08 AC 52 ms
24,036 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 51 ms
23,616 KB
testcase_12 WA -
testcase_13 AC 51 ms
23,672 KB
testcase_14 AC 53 ms
24,360 KB
testcase_15 AC 54 ms
23,988 KB
testcase_16 WA -
testcase_17 AC 53 ms
24,000 KB
testcase_18 WA -
testcase_19 AC 55 ms
24,000 KB
testcase_20 WA -
testcase_21 AC 52 ms
23,532 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 51 ms
23,696 KB
testcase_26 AC 50 ms
23,424 KB
testcase_27 WA -
testcase_28 AC 53 ms
23,580 KB
testcase_29 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*
import sys
left = 1
right = 10 ** 9 + 1
mid = 0
while right - left > 1:
    mid = (left + right) / 2
    print("? %d" % mid)
    sys.stdout.flush()
    res = int(input())
    if res:
        left = mid
    else:
        right = mid
print("! %d" % mid)
0