結果

問題 No.513 宝探し2
ユーザー kohei2019kohei2019
提出日時 2022-05-15 13:49:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 99 ms / 2,000 ms
コード長 408 bytes
コンパイル時間 294 ms
コンパイル使用メモリ 87,204 KB
実行使用メモリ 87,528 KB
平均クエリ数 58.58
最終ジャッジ日時 2023-09-24 03:03:32
合計ジャッジ時間 2,559 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 99 ms
87,024 KB
testcase_01 AC 98 ms
87,256 KB
testcase_02 AC 96 ms
87,088 KB
testcase_03 AC 99 ms
87,196 KB
testcase_04 AC 97 ms
87,528 KB
testcase_05 AC 96 ms
87,192 KB
testcase_06 AC 97 ms
87,196 KB
testcase_07 AC 97 ms
87,304 KB
testcase_08 AC 97 ms
86,976 KB
testcase_09 AC 95 ms
87,112 KB
testcase_10 AC 96 ms
87,012 KB
testcase_11 AC 96 ms
87,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def func(arg):
    print(arg,0)
    a = int(input())
    if a == 0:
        exit()
    return a

def sanbunntan(l,r):
    while l + 2 < r:
        c1 = l+(r-l)//3
        c2 = r-(r-l)//3
        if func(c1)<func(c2):
            r = c2
        else:
            l = c1
    val = sorted([(func(i),i) for i in range(l,r+1)])[0][1]
    return val

x = sanbunntan(0, 100001)
y = func(x)

print(x,y)
int(input())
0