結果
問題 | 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 syshigh = 10**9low = 1while high-low > 1:middle = (high+low)/2print "? %d" % middlesys.stdout.flush()if int(raw_input()) == 1:low = middleelse:high = middleprint "? %d" % lowsys.stdout.flush()print "! %d" % low if int(raw_input()) == 1 else "! %d" % highsys.stdout.flush()