結果
| 問題 |
No.3212 SUPER Guess the Number
|
| コンテスト | |
| ユーザー |
ゼット
|
| 提出日時 | 2025-08-04 21:11:03 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 68 ms / 2,000 ms |
| コード長 | 383 bytes |
| コンパイル時間 | 336 ms |
| コンパイル使用メモリ | 82,404 KB |
| 実行使用メモリ | 70,900 KB |
| 平均クエリ数 | 23.17 |
| 最終ジャッジ日時 | 2025-08-04 21:11:06 |
| 合計ジャッジ時間 | 2,466 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 |
ソースコード
a=10**8
print('?',a,flush=True)
l=1
r=10**6
while True:
if l==r:
break
m=(l+r)//2
if a<m:
k=m-a
a2=m+k+1
print('?',a2,flush=True)
ans=int(input())
if ans==1:
l=m+1
else:
r=m
else:
k=a-m
a2=m-(k+1)
print('?',a2,flush=True)
ans=int(input())
if ans==1:
r=m
else:
l=m
a=a2
print('!',l,flush=True)
ゼット