結果
| 問題 | No.1429 Simple Dowsing |
| コンテスト | |
| ユーザー |
学ぶマン
|
| 提出日時 | 2025-03-24 18:45:15 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 386 bytes |
| コンパイル時間 | 350 ms |
| コンパイル使用メモリ | 82,096 KB |
| 実行使用メモリ | 84,736 KB |
| 平均クエリ数 | 1.00 |
| 最終ジャッジ日時 | 2025-03-24 18:45:18 |
| 合計ジャッジ時間 | 3,125 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 15 |
ソースコード
# k 乗根
def sqrt(n: int, k = 2):
l = k - 1
if not n: return 0
y = 1 << (n.bit_length() + l) // k
x = y + 1
while y < x:
x = y
y = (l * x + n // (x ** l)) // k
return x
print('?, 0, 0', flush=True)
d1 = int(input())
print('?, 100, 0', flush=True)
d2 = int(input())
a = (d1 - d2 + 10**4)//200
b = sqrt(d1 - a**2)
print('!', a, b, flush=True)
学ぶマン