#include #include using namespace std; int n; long double p, q; long double mat[1005][1005]; void swap(int i, int j) { for(int k = 1; k <= n+1; k++){ long double t = mat[i][k]; mat[i][k] = mat[j][k]; mat[j][k] = t; } } int main(void) { cin >> n >> p >> q; for(int i = 1; i <= n; i++){ for(int j = 1; j <= n; j++){ if(i==j) mat[i][j] = 1; if(i+1==j) mat[i][j] = -q; if(i==j+1) mat[i][j] = -p; } } mat[1][n+1] = p; for(int i = 1; i <= n; i++){ long double div = mat[i][i]; for(int j = i; j <= i+1; j++) if(j <= n) mat[i][j] /= div; mat[i][n+1] /= div; for(int j = 1; j <= i+1; j++){ if(j+1 > n) continue; long double coe = mat[j][i]; if(i == j) continue; for(int k = i; k <= i+1; k++){ if(k <= n) mat[j][k] -= coe * mat[i][k]; } mat[j][n+1] -= coe * mat[i][n+1]; } } printf("%.11Lf\n", mat[1][n+1]); return 0; }