Untitled
unknown
c_cpp
a year ago
444 B
10
Indexable
#include <bits/stdc++.h>
using namespace std;
int32_t main() {
cout.setf(ios::fixed);
cout.precision(15);
int C, M, F;
cin >> C >> M >>F;
if (M > C) {
cout << 1.0;
return 0;
}
if (M <= 1e6) {
long double ans= 1;
for (int k = 0; k < M; ++k)
ans *= 2 * (C - k) / (long double)(2 * C - k);
cout << 1 - ans;
} else {
cout << 1.0;
}
}Editor is loading...
Leave a Comment