結果
| 問題 |
No.3212 SUPER Guess the Number
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-07-25 22:31:30 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 501 bytes |
| コンパイル時間 | 542 ms |
| コンパイル使用メモリ | 82,904 KB |
| 実行使用メモリ | 71,288 KB |
| 平均クエリ数 | 23.42 |
| 最終ジャッジ日時 | 2025-07-25 22:31:41 |
| 合計ジャッジ時間 | 3,686 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 12 |
ソースコード
MIN = 1
MAX = 10 ** 6
print('?', MIN)
X = [MIN]
l = MIN
r = MAX
while r - l > 1:
x = l + r - X[-1]
print('?', x)
c = int(input())
if c == 1:
if x < X[-1]:
l = (x + X[-1]) // 2
else:
r = (x + X[-1]) // 2
else:
if x < X[-1]:
r = (x + X[-1]) // 2
else:
l = (x + X[-1]) // 2
X.append(x)
print('?', l)
c = int(input())
print('?', r)
c = int(input())
if c == 1:
print('!', l)
else:
print('!', r)