<|instruction|>
Solve the below problem. The solution should start with an abridged problem statement. Then key observations. Then full solution based on the observations. Then C++ and Python implementations with comments.

144. Meeting

time limit per test: 0.25 sec.
memory limit per test: 4096 KB


Two of the three members of the winning team of one of the ACM regional contests are going to meet in order to train for the upcoming World Finals. They decided that they will meet sometime between X o'clock and Y o'clock. Because they never get anywhere on time (they were late even on the day of the regional contest), they did not set an exact time when they will meet. However, they decided that the one who gets first at the meeting point will not wait more than Z minutes for the other one (they calculated that, if the other one will not come within Z minutes from the arrival of the first of them, then it is very probable that he will not show up at all).
Knowing that, in the end, both of them will show up at some time between X o'clock and Y o'clock (not necessarily after an integer number of minutes), compute which is the probability that they will actually meet.


Input

The input will contain 2 integer numbers X and Y (0<=X<Y<=24) and one real number Z ( 0 < Z <= 60*(Y-X) ).


Output

You should output the required probability with 7 decimal digits (rounded according to the 8th decimal digit).


Sample Input

11 12 20.0
Sample Output

0.5555556
Author	: Mugurel Ionut Andreica
Resource	: SSU::Online Contester Fall Contest #2
Date	: Fall 2002

<|response|>
1. Abridged Problem Statement
Two people plan to meet sometime between X hours and Y hours. Each arrives at a random time uniformly in [X, Y] (continuous). Whoever arrives first will only wait up to Z minutes for the other; if the other arrives later than that, they leave without meeting. Compute the probability that they actually meet. Print the result rounded to 7 decimal places.

2. Key Observations
- Let T₁ and T₂ be the arrival times (in hours) of person 1 and person 2; they are independent and uniform on [X, Y].
- They meet iff the difference in arrival times is at most Z minutes, i.e. |T₁−T₂| ≤ Z/60 (hours).
- A common trick is to convert the time interval into minutes from 0 to δ, where δ = (Y−X)×60. Define U₁ = (T₁−X)×60 and U₂ = (T₂−X)×60; U₁,U₂∼Uniform[0,δ].
- Geometrically, (U₁,U₂) is uniform over the square [0,δ]×[0,δ]. The meeting region is the band |U₁−U₂| ≤ Z.
- The total area of the square is δ². The area where |U₁−U₂| > Z consists of two right triangles each with legs (δ−Z), so its area is 2·((δ−Z)²/2) = (δ−Z)².
- Therefore the “meeting” area = δ² − (δ−Z)² = 2δZ − Z².
- The probability = (2δZ − Z²) / δ² = 2·(Z/δ) − (Z/δ)².

3. Full Solution Approach
1. Read integers X, Y and real Z.
2. Compute δ = (Y − X) × 60.0 (total window size in minutes).
3. Apply the area formula directly. Writing it as two terms for numerical clarity,
     probability = Z²/δ² + 2·(δ − Z)·Z/δ²,
   which simplifies to (2δZ − Z²)/δ². The constraint Z ≤ δ is guaranteed by the input, and the boundary Z = δ yields probability 1 naturally.
4. Print probability to 7 decimal places (rounded).

Time complexity is O(1) and memory is O(1).

4. C++ Implementation
```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;
};

double X, Y, Z;

void read() { cin >> X >> Y >> Z; }

void solve() {
    // Both arrival times are uniform over a window of delta = (Y - X) * 60
    // minutes, so the sample space is a delta x delta square. They meet when
    // their arrival times differ by at most Z, the diagonal band
    // |t1 - t2| <= Z. Its area is delta^2 minus the two corner triangles of
    // total area (delta - Z)^2, and we report that area divided by delta^2,
    // written here as Z^2/delta^2 + 2*(delta - Z)*Z/delta^2.

    double delta = (Y - X) * 60;
    double ans = (Z * Z) / (delta * delta);
    ans += 2 * (delta - Z) * Z / (delta * delta);
    cout << fixed << setprecision(7) << ans << '\n';
}

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;
}
```

5. Python Implementation with Detailed Comments
```python
import sys

def main():
    # Read X, Y, Z from stdin
    data = sys.stdin.read().split()
    X, Y = map(int, data[:2])
    Z = float(data[2])

    # Convert meeting window length from hours to minutes
    delta = (Y - X) * 60.0

    # Use the derived probability formula
    # success area = 2*delta*Z - Z^2
    # total area   = delta^2
    probability = (2.0 * delta * Z - Z * Z) / (delta * delta)

    # Print result rounded to 7 decimal places
    sys.stdout.write(f"{probability:.7f}\n")

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