結果

問題 No.246 質問と回答
ユーザー 0w10w1
提出日時 2016-11-21 21:02:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 265 bytes
コンパイル時間 68 ms
コンパイル使用メモリ 10,712 KB
実行使用メモリ 24,420 KB
平均クエリ数 47.00
最終ジャッジ日時 2023-09-23 11:47:18
合計ジャッジ時間 3,553 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
23,676 KB
testcase_01 WA -
testcase_02 AC 55 ms
23,520 KB
testcase_03 AC 56 ms
23,712 KB
testcase_04 WA -
testcase_05 AC 57 ms
24,300 KB
testcase_06 AC 57 ms
24,060 KB
testcase_07 WA -
testcase_08 AC 56 ms
24,036 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 57 ms
23,684 KB
testcase_12 AC 55 ms
23,716 KB
testcase_13 AC 56 ms
23,832 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 57 ms
24,396 KB
testcase_17 AC 56 ms
23,396 KB
testcase_18 AC 56 ms
23,472 KB
testcase_19 WA -
testcase_20 AC 55 ms
23,588 KB
testcase_21 AC 55 ms
23,680 KB
testcase_22 WA -
testcase_23 AC 54 ms
23,568 KB
testcase_24 AC 56 ms
23,652 KB
testcase_25 AC 58 ms
23,676 KB
testcase_26 AC 56 ms
23,712 KB
testcase_27 AC 56 ms
24,060 KB
testcase_28 AC 55 ms
24,048 KB
testcase_29 AC 57 ms
23,844 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
lb = 1
rb = 100000000000000
ans = -1
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