#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; const double eps = 1e-7; int main(void){ int n; double p[1000], q[1000]; double Q[1000]; cin >> n; for (int i = 0; i < n; i++){ cin >> p[i]; p[i] /= 1000; } for (int i = 0; i < n; i++){ cin >> q[i]; Q[i] = 1; q[i] /= 100; } double E = 0; int cnt = 0; while (1){ cnt ++; int index = 0; double px = 0; for (int i = 0; i < n; i++){ double d = p[i] * q[i] * Q[i]; if (d > px){ index = i; px = d; } } E += cnt*px; Q[index] *= (1 - q[index]); if (cnt*px < eps)break; } printf("%.4f\n", E); return(0); }