結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 54 ms
24,036 KB
testcase_03 AC 55 ms
23,376 KB
testcase_04 AC 55 ms
23,572 KB
testcase_05 AC 55 ms
24,360 KB
testcase_06 WA -
testcase_07 AC 56 ms
23,668 KB
testcase_08 AC 55 ms
23,480 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 55 ms
23,592 KB
testcase_12 WA -
testcase_13 AC 55 ms
24,048 KB
testcase_14 AC 56 ms
23,460 KB
testcase_15 AC 57 ms
24,036 KB
testcase_16 WA -
testcase_17 AC 55 ms
23,656 KB
testcase_18 AC 55 ms
23,536 KB
testcase_19 AC 55 ms
24,048 KB
testcase_20 WA -
testcase_21 AC 55 ms
23,640 KB
testcase_22 AC 55 ms
23,588 KB
testcase_23 AC 54 ms
24,048 KB
testcase_24 WA -
testcase_25 AC 55 ms
23,676 KB
testcase_26 WA -
testcase_27 AC 55 ms
23,756 KB
testcase_28 AC 55 ms
24,348 KB
testcase_29 AC 55 ms
23,844 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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