結果

問題 No.246 質問と回答
ユーザー mlihua09mlihua09
提出日時 2020-09-01 00:05:02
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 118 ms / 2,000 ms
コード長 198 bytes
コンパイル時間 628 ms
コンパイル使用メモリ 87,060 KB
実行使用メモリ 87,544 KB
平均クエリ数 30.97
最終ジャッジ日時 2023-09-23 20:36:16
合計ジャッジ時間 5,977 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
87,544 KB
testcase_01 AC 115 ms
87,304 KB
testcase_02 AC 115 ms
87,524 KB
testcase_03 AC 118 ms
87,072 KB
testcase_04 AC 115 ms
86,688 KB
testcase_05 AC 117 ms
87,460 KB
testcase_06 AC 115 ms
87,444 KB
testcase_07 AC 116 ms
86,880 KB
testcase_08 AC 115 ms
86,960 KB
testcase_09 AC 114 ms
87,176 KB
testcase_10 AC 116 ms
86,936 KB
testcase_11 AC 116 ms
86,968 KB
testcase_12 AC 113 ms
87,140 KB
testcase_13 AC 115 ms
87,084 KB
testcase_14 AC 114 ms
87,452 KB
testcase_15 AC 115 ms
87,408 KB
testcase_16 AC 114 ms
86,956 KB
testcase_17 AC 116 ms
87,352 KB
testcase_18 AC 114 ms
87,348 KB
testcase_19 AC 113 ms
86,740 KB
testcase_20 AC 116 ms
87,124 KB
testcase_21 AC 116 ms
87,284 KB
testcase_22 AC 115 ms
87,328 KB
testcase_23 AC 114 ms
86,944 KB
testcase_24 AC 114 ms
87,436 KB
testcase_25 AC 116 ms
87,524 KB
testcase_26 AC 116 ms
87,364 KB
testcase_27 AC 114 ms
87,340 KB
testcase_28 AC 113 ms
87,100 KB
testcase_29 AC 114 ms
86,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
sys.stdout.flush()

x = 0
y = 10 ** 9
while x < y:
    
    z = (x + y) // 2 + 1
    print('?', z)
    if input() == '1':
        x = z
    else:
        y = z - 1
        
print('!', x)
0