結果
問題 | No.246 質問と回答 |
ユーザー |
|
提出日時 | 2016-09-03 17:39:01 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 62 ms / 2,000 ms |
コード長 | 332 bytes |
コンパイル時間 | 270 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 25,592 KB |
平均クエリ数 | 31.90 |
最終ジャッジ日時 | 2024-07-16 20:05:55 |
合計ジャッジ時間 | 3,642 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 30 |
ソースコード
import sys high = 10**9 low = 1 while high-low > 1: middle = (high+low)/2 print "? %d" % middle sys.stdout.flush() if int(raw_input()) == 1: low = middle else: high = middle print "? %d" % low sys.stdout.flush() print "! %d" % low if int(raw_input()) == 1 else "! %d" % high sys.stdout.flush()