結果
問題 | No.246 質問と回答 |
ユーザー |
|
提出日時 | 2015-07-17 23:00:07 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 85 ms / 2,000 ms |
コード長 | 288 bytes |
コンパイル時間 | 104 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 27,480 KB |
平均クエリ数 | 30.90 |
最終ジャッジ日時 | 2024-07-16 19:43:47 |
合計ジャッジ時間 | 4,714 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 30 |
ソースコード
import sys res = -1 low, high = 1, 10 ** 9 check = [] for i in range(100): mid = (low + high) // 2 if mid in check: print("!", mid) sys.stdout.flush() break check.append(mid) print("?", mid) sys.stdout.flush() res = int(input()) if res == 1: low = mid else: high = mid