結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 55 ms
23,340 KB
testcase_03 AC 55 ms
23,928 KB
testcase_04 AC 55 ms
24,048 KB
testcase_05 AC 56 ms
24,048 KB
testcase_06 WA -
testcase_07 AC 55 ms
24,144 KB
testcase_08 AC 55 ms
24,276 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 55 ms
24,324 KB
testcase_12 WA -
testcase_13 AC 56 ms
24,036 KB
testcase_14 AC 57 ms
23,412 KB
testcase_15 AC 56 ms
23,476 KB
testcase_16 WA -
testcase_17 AC 54 ms
23,952 KB
testcase_18 AC 55 ms
24,180 KB
testcase_19 AC 56 ms
23,544 KB
testcase_20 WA -
testcase_21 AC 55 ms
23,552 KB
testcase_22 AC 56 ms
24,408 KB
testcase_23 AC 56 ms
23,636 KB
testcase_24 WA -
testcase_25 AC 55 ms
24,048 KB
testcase_26 WA -
testcase_27 AC 55 ms
23,640 KB
testcase_28 AC 54 ms
23,712 KB
testcase_29 AC 54 ms
24,288 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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