結果
| 問題 |
No.246 質問と回答
|
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2025-02-10 19:52:05 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 93 ms / 2,000 ms |
| コード長 | 394 bytes |
| コンパイル時間 | 274 ms |
| コンパイル使用メモリ | 82,312 KB |
| 実行使用メモリ | 71,200 KB |
| 平均クエリ数 | 30.90 |
| 最終ジャッジ日時 | 2025-02-10 19:52:10 |
| 合計ジャッジ時間 | 4,771 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
ソースコード
def query_ask(y):
print(f"? {y}", flush=True)
if DEBUG:
return y <= X
else:
return int(input())
def query_ans(x):
print(f"! {x}", flush=True)
DEBUG = 0
if DEBUG:
print("DEBUG MODE!")
X = 10
from bisect import bisect_left
def reverse_result(y):
return 1-query_ask(y)
ans = bisect_left(range(10**9+1),1,key=reverse_result)
query_ans(ans-1)
convexineq