結果

問題 No.246 質問と回答
ユーザー brthyyjpbrthyyjp
提出日時 2022-03-30 20:05:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 230 bytes
コンパイル時間 1,936 ms
コンパイル使用メモリ 86,376 KB
実行使用メモリ 87,472 KB
平均クエリ数 30.87
最終ジャッジ日時 2023-09-23 20:39:15
合計ジャッジ時間 6,904 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
87,056 KB
testcase_01 AC 119 ms
86,860 KB
testcase_02 AC 118 ms
86,612 KB
testcase_03 AC 118 ms
86,720 KB
testcase_04 AC 115 ms
87,100 KB
testcase_05 AC 119 ms
87,156 KB
testcase_06 AC 118 ms
87,380 KB
testcase_07 AC 116 ms
87,336 KB
testcase_08 AC 117 ms
86,852 KB
testcase_09 AC 116 ms
86,940 KB
testcase_10 AC 117 ms
86,752 KB
testcase_11 AC 117 ms
87,252 KB
testcase_12 AC 115 ms
86,840 KB
testcase_13 AC 116 ms
86,956 KB
testcase_14 AC 118 ms
87,100 KB
testcase_15 AC 115 ms
87,376 KB
testcase_16 AC 116 ms
86,900 KB
testcase_17 AC 116 ms
87,280 KB
testcase_18 AC 117 ms
87,348 KB
testcase_19 AC 116 ms
87,160 KB
testcase_20 AC 116 ms
86,856 KB
testcase_21 AC 117 ms
87,368 KB
testcase_22 AC 116 ms
87,176 KB
testcase_23 AC 117 ms
87,352 KB
testcase_24 AC 115 ms
87,172 KB
testcase_25 AC 117 ms
87,132 KB
testcase_26 AC 116 ms
87,472 KB
testcase_27 AC 115 ms
86,968 KB
testcase_28 AC 115 ms
86,976 KB
testcase_29 AC 116 ms
86,856 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def query(y):
    print('?', y, flush=True)
    v = int(input())
    return v

ok = 0
ng = 10**9+1
while ok+1 < ng:
    mid = (ok+ng)//2
    v = query(mid)
    if v == 1:
        ok = mid
    else:
        ng = mid
print('!', ok)
0