結果
| 問題 | No.246 質問と回答 |
| コンテスト | |
| ユーザー |
koyopro
|
| 提出日時 | 2015-09-20 21:27:43 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 157 ms / 2,000 ms |
| コード長 | 323 bytes |
| 記録 | |
| コンパイル時間 | 242 ms |
| コンパイル使用メモリ | 77,424 KB |
| 最終ジャッジ日時 | 2025-12-03 17:10:28 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
ソースコード
# -*- coding: utf-8 -*-
import sys
top = 10 ** 9
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()
koyopro