結果

問題 No.513 宝探し2
ユーザー htkbhtkb
提出日時 2017-05-05 23:01:06
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 555 bytes
コンパイル時間 399 ms
コンパイル使用メモリ 10,868 KB
実行使用メモリ 24,408 KB
平均クエリ数 4.75
最終ジャッジ日時 2023-09-23 13:29:39
合計ジャッジ時間 3,408 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

d = map(int, input("50000 50000\n"))
up = int(input("50000 40000\n"))
down = int(input("50000 60000\n"))
left = int(input("40000 50000\n"))
right = int(input("60000 50000\n"))
if d+10000==up:
    y_sign = 1
else:
    y_sign = -1
if d+10000==left:
    x_sign = 1
else:
    x_sign = -1

x, y = (50000, 50000)

while True:
    mx = int(input("%d %d\n"%(x+(d*x_sign),y)))
    my = int(input("%d %d\n"%(x, y+(d*y_sign))))
    if mx==my:
        x_sign*=-1
        y_sign*=-1
    elif mx<my:
        y_sign*=-1
    else:
        x_sign*=-1
    d = min(mx,my)//2
0