結果

問題 No.1429 Simple Dowsing
ユーザー 👑 tamatotamato
提出日時 2021-03-14 14:05:15
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 103 ms / 2,000 ms
コード長 473 bytes
コンパイル時間 326 ms
コンパイル使用メモリ 87,376 KB
実行使用メモリ 92,180 KB
平均クエリ数 3.00
最終ジャッジ日時 2023-09-24 09:59:49
合計ジャッジ時間 3,050 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 102 ms
87,976 KB
testcase_01 AC 99 ms
87,388 KB
testcase_02 AC 98 ms
87,984 KB
testcase_03 AC 100 ms
91,432 KB
testcase_04 AC 100 ms
91,760 KB
testcase_05 AC 97 ms
87,512 KB
testcase_06 AC 102 ms
92,156 KB
testcase_07 AC 101 ms
92,056 KB
testcase_08 AC 101 ms
91,460 KB
testcase_09 AC 101 ms
92,180 KB
testcase_10 AC 99 ms
87,576 KB
testcase_11 AC 103 ms
91,876 KB
testcase_12 AC 102 ms
92,060 KB
testcase_13 AC 101 ms
91,756 KB
testcase_14 AC 97 ms
87,472 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

    print("?", 0, 0)
    sys.stdout.flush()
    d1 = int(input())
    print("?", 0, 100)
    sys.stdout.flush()
    d2 = int(input())

    for p in range(101):
        for q in range(101):
            if p**2 + q**2 == d1 and p**2 + (q-100)**2 == d2:
                print("!", p, q)
                sys.stdout.flush()
                exit()


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