結果

問題 No.246 質問と回答
ユーザー rlangevinrlangevin
提出日時 2023-01-14 13:52:26
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 123 ms / 2,000 ms
コード長 233 bytes
コンパイル時間 340 ms
コンパイル使用メモリ 87,040 KB
実行使用メモリ 87,704 KB
平均クエリ数 30.90
最終ジャッジ日時 2023-09-23 20:40:28
合計ジャッジ時間 5,727 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
87,704 KB
testcase_01 AC 123 ms
87,396 KB
testcase_02 AC 118 ms
87,132 KB
testcase_03 AC 121 ms
87,200 KB
testcase_04 AC 118 ms
87,588 KB
testcase_05 AC 120 ms
87,324 KB
testcase_06 AC 118 ms
87,296 KB
testcase_07 AC 115 ms
87,624 KB
testcase_08 AC 117 ms
87,204 KB
testcase_09 AC 117 ms
87,304 KB
testcase_10 AC 121 ms
86,896 KB
testcase_11 AC 118 ms
86,876 KB
testcase_12 AC 114 ms
87,504 KB
testcase_13 AC 115 ms
87,464 KB
testcase_14 AC 116 ms
87,120 KB
testcase_15 AC 114 ms
87,476 KB
testcase_16 AC 119 ms
87,252 KB
testcase_17 AC 119 ms
87,036 KB
testcase_18 AC 120 ms
87,296 KB
testcase_19 AC 119 ms
87,136 KB
testcase_20 AC 118 ms
87,184 KB
testcase_21 AC 119 ms
87,032 KB
testcase_22 AC 115 ms
87,096 KB
testcase_23 AC 113 ms
86,924 KB
testcase_24 AC 114 ms
87,164 KB
testcase_25 AC 119 ms
87,608 KB
testcase_26 AC 116 ms
87,292 KB
testcase_27 AC 118 ms
86,948 KB
testcase_28 AC 118 ms
87,420 KB
testcase_29 AC 117 ms
87,252 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

yes = 1
no = 10 ** 9 + 1
while no - yes != 1:
    mid = (yes + no)//2
    print("? %d" % mid)
    sys.stdout.flush()
    if int(input()):
        yes = mid
    else:
        no = mid
print("! %d" % yes)
sys.stdout.flush()
0