func_code_string: #include <bits/stdc++.h>   using namespace std;   template <class T>   inline T sqr(T x) {     return x * x;   }   const double PI = acos(-1.0);   using namespace std;   double dp[1005][1005];   int main(void) {     int n, m;     scanf( %d %d , &n, &m);     if (n == 1) {       puts( 1.0000000 );       return 0;     }     dp[0][0] = 1;     for (int i = 1; i <= n - 1; i++) {       dp[i][0] = dp[i - 1][0] * (1 - (m - 1.0) / (n * m - i));       for (int j = 1; j <= i && j <= m; j++) {         dp[i][j] = dp[i - 1][j - 1] * (m - j + 0.0) / (n * m - i) +                    dp[i - 1][j] * (1 - (m - j - 1.0) / (n * m - i));       }     }     double ans = 0;     for (int i = 0; i <= n - 1; i++) {       ans += dp[n - 1][i] * (i + 1.0) / n;     }     printf( %.10lf n , ans);     return 0;   }   