結果

問題 No.594 壊れた宝物発見機
ユーザー daku9640daku9640
提出日時 2017-11-11 00:12:21
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 654 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 10,940 KB
実行使用メモリ 43,812 KB
最終ジャッジ日時 2023-09-23 15:44:10
合計ジャッジ時間 6,569 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from itertools import product
from math import hypot
readline = sys.stdin.readline
def solve():
    d = [0] * 30
    x = [-100, 0, 100]
    y = [-100, 0, 100]
    z = [-100, 0, 100]
    for i, (x1, y1, z1) in enumerate(product([0, 1, 2], repeat=3)):
        print("?", x[x1], y[y1], z[z1])
        d[i] = int(input())
    for x0, y0, z0 in product(range(-100, 101), repeat=3):
        for j, (x2, y2, z2) in enumerate(product([0, 1, 2], repeat=3)):
            if int(hypot(hypot(x[x2] - x0, y[y2] - y0), hypot(y[y2] - y0, z[z2] - z0))) != d[j]:
                break
        else:
            print("!", x0, y0, z0)
            break
solve()
0