結果
| 問題 | No.1429 Simple Dowsing |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-05-09 01:19:41 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 197 ms / 2,000 ms |
| + 2µs | |
| コード長 | 468 bytes |
| 記録 | |
| コンパイル時間 | 63 ms |
| コンパイル使用メモリ | 82,896 KB |
| 実行使用メモリ | 62,032 KB |
| 平均クエリ数 | 2.87 |
| 最終ジャッジ日時 | 2026-09-29 22:11:46 |
| 合計ジャッジ時間 | 2,239 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 |
ソースコード
print("? 0 0")
d = int(input())
S = set()
for a in range(101):
for b in range(101):
if a*a+b*b==d:
S.add((a, b))
if len(S)==1:
for a, b in S:
print(f"! {a} {b}")
exit()
for a, b in S:
print(f"? {a} {b}")
d2 = int(input())
if d2==0:
print(f"! {a} {b}")
exit()
else:
for na, nb in S:
if d2==(na-a)**2+(nb-b)**2:
print(f"! {na} {nb}")
exit()