結果
問題 |
No.246 質問と回答
|
ユーザー |
![]() |
提出日時 | 2015-09-20 21:25:53 |
言語 | Python2 (2.7.18) |
結果 |
WA
|
実行時間 | - |
コード長 | 321 bytes |
コンパイル時間 | 77 ms |
コンパイル使用メモリ | 7,168 KB |
実行使用メモリ | 25,496 KB |
平均クエリ数 | 8.00 |
最終ジャッジ日時 | 2024-07-16 07:47:58 |
合計ジャッジ時間 | 3,481 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 30 |
ソースコード
# -*- coding: utf-8 -*- import sys top = 10 ** 2 bottom = 1 while True: mid = (top + bottom) / 2 print "? %d" % mid sys.stdout.flush() res = int(input()) if res == 1: bottom = mid else: top = mid if bottom + 1 >= top: break print "! %d" % (bottom) sys.stdout.flush()