結果

問題 No.3018 目隠し宝探し
ユーザー 👑 loop0919
提出日時 2025-01-01 02:58:53
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 270 bytes
コンパイル時間 351 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 81,912 KB
平均クエリ数 2.00
最終ジャッジ日時 2025-01-25 22:13:15
合計ジャッジ時間 3,911 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1
other WA * 20 RE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

H, W = map(int, input().split())
print("?", 1, 1)
d_1 = int(input())
print("?", 1, W)
d_2 = int(input())

for i in range(H):
    for j in range(W):
        if i**2 + j**2 == d_1 and i**2 + ((W + 1) - j)**2 == d_2:
            print("!", i + 1, j + 1)
            exit()
0