結果
| 問題 |
No.3212 SUPER Guess the Number
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-07-25 22:35:09 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 496 bytes |
| コンパイル時間 | 408 ms |
| コンパイル使用メモリ | 82,728 KB |
| 実行使用メモリ | 71,204 KB |
| 平均クエリ数 | 7.92 |
| 最終ジャッジ日時 | 2025-07-25 22:35:31 |
| 合計ジャッジ時間 | 2,820 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)