結果

問題 No.253 ロウソクの長さ
ユーザー takakintakakin
提出日時 2020-06-23 22:35:43
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 409 bytes
コンパイル時間 183 ms
コンパイル使用メモリ 10,912 KB
実行使用メモリ 24,432 KB
平均クエリ数 29.44
最終ジャッジ日時 2023-09-24 03:43:08
合計ジャッジ時間 4,319 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
23,600 KB
testcase_01 AC 39 ms
23,548 KB
testcase_02 AC 40 ms
23,964 KB
testcase_03 AC 39 ms
24,204 KB
testcase_04 AC 40 ms
24,360 KB
testcase_05 AC 40 ms
23,364 KB
testcase_06 AC 40 ms
23,316 KB
testcase_07 AC 40 ms
23,628 KB
testcase_08 AC 40 ms
23,532 KB
testcase_09 WA -
testcase_10 AC 40 ms
23,388 KB
testcase_11 AC 40 ms
23,636 KB
testcase_12 AC 40 ms
23,624 KB
testcase_13 AC 40 ms
23,324 KB
testcase_14 WA -
testcase_15 AC 41 ms
23,556 KB
testcase_16 AC 41 ms
23,688 KB
testcase_17 AC 40 ms
23,636 KB
testcase_18 AC 39 ms
24,192 KB
testcase_19 WA -
testcase_20 AC 39 ms
23,452 KB
testcase_21 AC 40 ms
23,688 KB
testcase_22 WA -
testcase_23 AC 40 ms
24,276 KB
testcase_24 AC 40 ms
23,904 KB
testcase_25 AC 40 ms
23,952 KB
testcase_26 AC 40 ms
23,532 KB
testcase_27 AC 39 ms
23,544 KB
testcase_28 AC 40 ms
23,976 KB
testcase_29 AC 39 ms
23,512 KB
testcase_30 AC 41 ms
23,580 KB
testcase_31 AC 39 ms
23,976 KB
testcase_32 AC 40 ms
23,320 KB
testcase_33 AC 40 ms
23,880 KB
testcase_34 WA -
testcase_35 AC 40 ms
24,288 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=lambda: sys.stdin.readline().rstrip()
l,r=10,10**9
ct=0
while r-l>1:
  mid=(l+r)//2
  print("?",max(0,mid-ct),flush=True)
  ct+=1
  ans=int(input())
  if ans==0:
    print("!",mid,flush=True)
    break

  elif ans==1:
    l=mid
  else:
    r=mid
else:
  print("?",max(0,r-ct),flush=True)
  ct+=1
  ans=int(input())
  if ans==0:
    print("!",r,flush=True)
  else:
    print("!",l,flush=True)
0