結果

問題 No.513 宝探し2
ユーザー kimiyukikimiyuki
提出日時 2017-05-09 18:25:01
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 38 ms / 2,000 ms
コード長 315 bytes
コンパイル時間 100 ms
コンパイル使用メモリ 10,740 KB
実行使用メモリ 24,512 KB
平均クエリ数 2.83
最終ジャッジ日時 2023-09-24 01:14:46
合計ジャッジ時間 1,459 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
24,460 KB
testcase_01 AC 38 ms
24,304 KB
testcase_02 AC 35 ms
23,952 KB
testcase_03 AC 38 ms
23,996 KB
testcase_04 AC 35 ms
23,752 KB
testcase_05 AC 33 ms
24,244 KB
testcase_06 AC 34 ms
24,104 KB
testcase_07 AC 33 ms
24,336 KB
testcase_08 AC 32 ms
23,968 KB
testcase_09 AC 33 ms
23,900 KB
testcase_10 AC 35 ms
23,764 KB
testcase_11 AC 34 ms
24,512 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
import sys
def d(x, y):
    print(x, y)
    sys.stdout.flush()
    result = int(input())
    if result == 0:
        sys.exit(0)
    return result
limit = 1000000000
d1 = d(0, 0)
d2 = d(limit, 0)
x = (+ limit + d1 - d2) // 2
y = (- limit + d1 + d2) // 2
d(x, y)
assert False # already exited
0