結果
| 問題 | No.246 質問と回答 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-08-10 05:01:29 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 485 bytes |
| 記録 | |
| コンパイル時間 | 118 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 27,736 KB |
| 平均クエリ数 | 30.30 |
| 最終ジャッジ日時 | 2024-07-16 15:59:01 |
| 合計ジャッジ時間 | 4,156 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 WA * 6 |
ソースコード
from sys import stdin, stdout
input = lambda: stdin.readline().rstrip()
write = stdout.write
def main():
min_ = 1
max_ = 1000000000
mid = max_ // 2
while 1:
print('?', mid)
stdout.flush()
res = int(input())
if res:
min_ = mid
else:
max_ = mid - 1
n = max_ - min_
if n < 2:
break
else:
mid = min_ + n // 2
print('!', min_)
stdout.flush()
main()