結果

問題 No.246 質問と回答
ユーザー roiti46
提出日時 2015-07-17 22:27:01
言語 Python2
(2.7.18)
結果
RE  
実行時間 -
コード長 226 bytes
コンパイル時間 586 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 26,356 KB
平均クエリ数 1.00
最終ジャッジ日時 2025-02-07 08:45:21
合計ジャッジ時間 4,415 ms
ジャッジサーバーID
(参考情報)
judge4 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other RE * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
ans = 1
res = 1
for cnt in xrange(11):
    print ("? %d" % ans | 1 << (11 - cnt))
    sys.stdout.flush()
    res = int(input())
    if res == 1:
        ans |= 1 << (11 - cnt)

print("! %d" % res)
sys.stdout.flush()
0