結果
| 問題 | No.3212 SUPER Guess the Number |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-07-25 22:35:09 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 496 bytes |
| 記録 | |
| コンパイル時間 | 240 ms |
| コンパイル使用メモリ | 95,596 KB |
| 実行使用メモリ | 78,720 KB |
| 平均クエリ数 | 7.92 |
| 最終ジャッジ日時 | 2026-07-13 13:03:12 |
| 合計ジャッジ時間 | 2,891 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 WA * 11 |
ソースコード
MIN = 1
MAX = 10
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]:
r = (x + X[-1]) // 2
else:
l = (x + X[-1]) // 2
else:
if x < X[-1]:
l = (x + X[-1]) // 2
else:
r = (x + X[-1]) // 2
X.append(x)
print('?', l)
c = int(input())
print('?', r)
c = int(input())
if c == 1:
print('!', r)
else:
print('!', l)