結果

問題 No.246 質問と回答
コンテスト
ユーザー koyopro
提出日時 2015-09-20 21:25:53
言語 PyPy2
(7.3.15)
結果
WA  
実行時間 -
コード長 321 bytes
記録
コンパイル時間 162 ms
コンパイル使用メモリ 77,700 KB
最終ジャッジ日時 2025-12-03 17:10:21
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 30
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

# -*- 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()
0