結果

問題 No.246 質問と回答
ユーザー 0w10w1
提出日時 2016-11-21 21:03:13
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 261 bytes
コンパイル時間 292 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 27,712 KB
平均クエリ数 30.00
最終ジャッジ日時 2024-07-16 11:22:29
合計ジャッジ時間 4,819 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
lb = 1
rb = 1000000000
ans = 202
while lb <= rb:
  mid = ( lb + rb ) / 2
  print ("? %d" % mid )
  sys.stdout.flush()
  res = int( input() )
  if res == 1:
    ans = mid
    lb = mid + 1
  else:
    rb = mid - 1
print("! %d" % ans)
sys.stdout.flush()
0