結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
23,616 KB
testcase_01 AC 54 ms
23,400 KB
testcase_02 WA -
testcase_03 AC 54 ms
23,364 KB
testcase_04 AC 55 ms
23,652 KB
testcase_05 WA -
testcase_06 AC 55 ms
23,424 KB
testcase_07 AC 55 ms
23,596 KB
testcase_08 WA -
testcase_09 AC 52 ms
23,860 KB
testcase_10 WA -
testcase_11 AC 55 ms
23,680 KB
testcase_12 AC 53 ms
24,300 KB
testcase_13 AC 55 ms
23,456 KB
testcase_14 AC 54 ms
23,976 KB
testcase_15 WA -
testcase_16 AC 53 ms
23,476 KB
testcase_17 AC 52 ms
23,604 KB
testcase_18 WA -
testcase_19 AC 53 ms
23,988 KB
testcase_20 AC 53 ms
23,572 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 51 ms
23,400 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 52 ms
23,832 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