結果

問題 No.1429 Simple Dowsing
ユーザー hiragnhiragn
提出日時 2022-10-25 04:21:55
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
QLE  
実行時間 -
コード長 412 bytes
コンパイル時間 92 ms
コンパイル使用メモリ 10,660 KB
実行使用メモリ 24,540 KB
平均クエリ数 2.07
最終ジャッジ日時 2023-09-16 05:00:53
合計ジャッジ時間 2,708 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 QLE -
testcase_01 AC 39 ms
24,220 KB
testcase_02 QLE -
testcase_03 QLE -
testcase_04 AC 39 ms
23,524 KB
testcase_05 QLE -
testcase_06 QLE -
testcase_07 QLE -
testcase_08 QLE -
testcase_09 QLE -
testcase_10 QLE -
testcase_11 QLE -
testcase_12 QLE -
testcase_13 QLE -
testcase_14 QLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    print("? 0 0")
    d1 = int(input())
    if d1 == 0:
        exit(print("! 0 0"))

    print("? 100 100")
    d2 = int(input())
    if d2 == 0:
        print("! 100 100")

    for x in range(101):
        for y in range(101):
            if x ^ 2 + y ^ 2 == d1 and (x - 100) ** 2 + (y - 100) ** 2 == d2:
                exit(print("! {} {}".format(x, y)))


if __name__ == "__main__":
    main()
0