結果

問題 No.513 宝探し2
ユーザー nanaenanae
提出日時 2017-05-06 00:18:00
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 482 bytes
コンパイル時間 72 ms
コンパイル使用メモリ 10,752 KB
実行使用メモリ 24,468 KB
平均クエリ数 100.00
最終ジャッジ日時 2023-09-23 13:52:10
合計ジャッジ時間 3,242 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

lim = 10**5

def solve():
    btm = 0
    top = lim

    while btm != top:
        d = (top - btm) // 3

        print(0, btm + d, flush=True)
        a1 = int(input())

        print(0, top - d, flush=True)
        a2 = int(input())

        if a1 < a2:
            top -= 1
        else:
            btm += 1

    print(0, btm, flush=True)
    a = int(input())

    print(a, btm, flush=True)
    a = int(input())

    return
    
if __name__ == '__main__':
    solve()
0