func_code_string: #include <bits/stdc++.h>   using namespace std;   long double f[1011][1011];   int m, n;   void init() {     memset(f, 0, sizeof f);     f[1][1] = 1;     for (int i = (1), _b = (n - 1); i <= _b; i++) {       for (int x = (0), _b = (min(i, m)); x <= _b; x++)         if (f[i][x] > 1e-50) {           f[i + 1][x] += f[i][x] * ((m * n - m) - (i - x)) / (double)(m * n - i);           f[i + 1][x + 1] += f[i][x] * (m - x) / (double)(m * n - i);         }     }   }   int main() {     ios ::sync_with_stdio(false);     cout << (fixed) << setprecision(8);     while (cin >> n >> m) {       init();       double res = 0.0;       for (int k = (1), _b = (min(m, n)); k <= _b; k++) {         res += f[n][k] * k / (double)n;       }       cout << res << endl;     }     return 0;   }   