結果

問題 No.514 宝探し3
ユーザー H3PO4H3PO4
提出日時 2022-05-18 08:19:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 37 ms / 2,000 ms
コード長 238 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 10,540 KB
実行使用メモリ 24,100 KB
平均クエリ数 2.75
最終ジャッジ日時 2023-10-14 14:12:44
合計ジャッジ時間 1,512 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
23,884 KB
testcase_01 AC 31 ms
24,100 KB
testcase_02 AC 33 ms
24,024 KB
testcase_03 AC 32 ms
23,684 KB
testcase_04 AC 31 ms
23,696 KB
testcase_05 AC 32 ms
23,700 KB
testcase_06 AC 32 ms
23,756 KB
testcase_07 AC 30 ms
23,908 KB
testcase_08 AC 30 ms
23,956 KB
testcase_09 AC 30 ms
23,748 KB
testcase_10 AC 33 ms
23,936 KB
testcase_11 AC 32 ms
23,756 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def query(x, y):
    print(x, y, flush=True)
    res = int(input())
    if res == 0:
        exit()
    return res


MAX = 1000000000

d1 = query(0, 0)
d2 = query(0, MAX)

ax = (d1 + d2 - MAX) // 2
ay = (d1 - d2 + MAX) // 2
query(ax, ay)
0