結果
| 問題 |
No.3018 目隠し宝探し
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-02-02 02:56:15 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 429 bytes |
| コンパイル時間 | 469 ms |
| コンパイル使用メモリ | 83,032 KB |
| 実行使用メモリ | 76,536 KB |
| 平均クエリ数 | 2.68 |
| 最終ジャッジ日時 | 2025-02-02 02:56:21 |
| 合計ジャッジ時間 | 5,823 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 18 WA * 3 |
ソースコード
H,W=map(int,input().split())
if H==1 and W==1:
print("!",1,1)
elif H==1:
print("?",1,1)
d11=int(input())
print("!",1,d11+1)
elif W==1:
print("?",1,1)
d11=int(input())
print("!",d11+1,1)
else:
print("?",1,1)
d11=int(input())
print("?",1,2)
d12=int(input())
for i in range(H):
for j in range(W):
if i**2+j**2==d11 and i**2+(j-1)**2==d12 : exit(print("!",i+1,j+1))