結果
問題 |
No.3212 SUPER Guess the Number
|
ユーザー |
![]() |
提出日時 | 2025-07-25 22:12:37 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 56 ms / 2,000 ms |
コード長 | 457 bytes |
コンパイル時間 | 205 ms |
コンパイル使用メモリ | 12,032 KB |
実行使用メモリ | 27,384 KB |
平均クエリ数 | 22.58 |
最終ジャッジ日時 | 2025-07-25 22:12:39 |
合計ジャッジ時間 | 1,711 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 |
ソースコード
import sys input = sys.stdin.readline MIN=1 MAX=1000000 mae=MIN count=0 print("?",MIN,flush=True) while MIN!=MAX: half=(MIN+MAX)//2 tugi=round(mae+(half-mae)*2) print("?",tugi,flush=True) ANS=int(input()) if ANS==1: if mae <tugi: MIN=half else: MAX=half else: if mae <tugi: MAX=half-1 else: MIN=half+1 mae=tugi print("!",MIN,flush=True)