結果

問題 No.246 質問と回答
ユーザー 紙ぺーぱー
提出日時 2015-05-08 16:13:11
言語 Python2
(2.7.18)
結果
AC  
実行時間 76 ms / 2,000 ms
コード長 235 bytes
コンパイル時間 632 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 25,476 KB
平均クエリ数 101.00
最終ジャッジ日時 2024-07-16 19:36:22
合計ジャッジ時間 4,659 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
l=1
r=1000000000
cnt=0
while l<r and cnt<100:
    cnt+=1
    m=(l+r)//2
    print("? %d" % m)
    sys.stdout.flush()
    ans=int(input())
    if ans==1:
        l=m
    else:
        r=m
print("! %d" % l)
sys.stdout.flush()
0