## 1. Abridged problem statement

Given a disc in the plane of radius r centered at (x₀, y₀), with the origin strictly outside the disc. The density at any point (x,y) is p(x,y)=ln(x²+y²). Compute the total mass
   M = ∬_{disc} ln(x²+y²) dx dy
and print it with a relative error up to 10⁻¹².

---

## 2. Detailed editorial

Let s = √(x₀² + y₀²). Since the origin is outside the disc, s > r. We want
  M = ∬_{(x–x₀)²+(y–y₀)² ≤ r²} ln(x²+y²) dx dy.

Step A: Change to polar coordinates (D,θ) centered at (x₀,y₀):
  x = x₀ + D cosθ,
  y = y₀ + D sinθ,
  0 ≤ D ≤ r,  0 ≤ θ < 2π,
  dx dy = D dD dθ.

Step B: Express x²+y²:
  x²+y² = s² + D² + 2 s D cosθ.

So
  M = ∫_{θ=0 to 2π} ∫_{D=0 to r} D · ln(s² + D² + 2sD cosθ)  dD dθ.

Step C: For fixed D (0≤D≤r), let A = s² + D², B = 2sD.  One uses the known integral
  I(A,B) = ∫₀^{2π} ln(A + B cosθ) dθ
when A > |B|; the result is
  I = 2π · ln( (A + √(A² – B²)) / 2 ).
Here
  √(A² – B²) = √((s² + D²)² – 4s²D²) = s² – D²,
  so (A + √(A² – B²))/2 = (s² + D² + s² – D²)/2 = s².
Thus
  ∫₀^{2π} ln(s² + D² + 2sD cosθ) dθ = 2π·ln(s²).

Step D: Then
  M = ∫₀^r D · [2π ln(s²)] dD = 2π ln(s²) ∫₀^r D dD
    = 2π ln(s²) · (r²/2) = π r² ln(s²)
    = π r² · 2 ln(s) = π r² · ln(s²).

Hence the final formula:
  M = π r² · ln(x₀² + y₀²).

---

## 3. C++ Solution

```cpp
#include <bits/stdc++.h>

using namespace std;

template<typename T1, typename T2>
ostream& operator<<(ostream& out, const pair<T1, T2>& x) {
    return out << x.first << ' ' << x.second;
}

template<typename T1, typename T2>
istream& operator>>(istream& in, pair<T1, T2>& x) {
    return in >> x.first >> x.second;
}

template<typename T>
istream& operator>>(istream& in, vector<T>& a) {
    for(auto& x: a) {
        in >> x;
    }
    return in;
};

template<typename T>
ostream& operator<<(ostream& out, const vector<T>& a) {
    for(auto x: a) {
        out << x << ' ';
    }
    return out;
};

const double pi = acos(-1);

double x, y, r;

void read() { cin >> x >> y >> r; }

void solve() {
    // Compute the mass of a disc centered at (x0, y0) with radius r, density
    // ln(x^2 + y^2). The origin is outside the disc, so s = sqrt(x0^2 + y0^2) >
    // r. The mass is the integral:
    //
    //     M = \int_{x,y \in D} \ln(x^2 + y^2) dx dy
    //
    // Use polar coordinates centered at (x0, y0). A point in the disc is:
    //
    //     x = x0 + D * cos(theta), y = y0 + D * sin(theta), 0 <= D <= r, 0 <=
    //     theta < 2pi.
    //
    // Then, x^2 + y^2 = s^2 + D^2 + 2sD * cos(theta).
    // The integral becomes:
    //
    //     M = \int_{theta=0}^{2pi} \int_{D=0}^r D * \ln(s^2 + D^2 + 2sD *
    //     cos(theta)) dD dtheta
    //
    // Integrate over theta first. For fixed D, let a = s^2 + D^2, b = 2sD.
    // Since s > r >= D:
    //
    //     \int_{0}^{2pi} \ln(a + b * cos(theta)) dtheta = 2pi * \ln(s^2).
    //
    // Thus, the mass is:
    //
    //     M = \int_{0}^r D * 2pi * \ln(s^2) dD = 2pi * \ln(s^2) * (r^2 / 2) =
    //     pi * r^2 * \ln(x0^2 + y0^2).

    double ans = pi * r * r * log(x * x + y * y);
    cout << setprecision(12) << fixed << ans << endl;
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int T = 1;
    // cin >> T;
    for(int test = 1; test <= T; test++) {
        read();
        // cout << "Case #" << test << ": ";
        solve();
    }

    return 0;
}
```

---

## 4. Python solution with detailed comments

```python
import math
import sys

def main():
    # Read three integers from standard input
    data = sys.stdin.read().split()
    x0, y0, r = map(int, data)

    # Compute squared distance from origin to center
    s2 = x0*x0 + y0*y0

    # According to the closed-form result:
    # mass = π * r² * ln(s²)
    mass = math.pi * (r**2) * math.log(s2)

    # Print with high precision
    print("{:.12f}".format(mass))

if __name__ == "__main__":
    main()
```

---

## 5. Compressed editorial

Mass M = ∬_{disc} ln(x²+y²) dx dy.
Shift to polar coords around (x₀,y₀); integrate θ using ∫₀²π ln(A + B cosθ)dθ = 2π ln((A+√(A²–B²))/2). With A = s²+D², B = 2sD, one gets 2π ln(s²). Then ∫₀ʳ D dD = r²/2. Final M = π r² ln(x₀²+y₀²).
