#include using namespace std; vector m(5010,-1); double f(int n) { if(m[n] != -1) return m[n]; if(n == 0) return 0; double sum = 0; for(int i=0;i>N; cout << fixed << setprecision(15) << f(N) << endl; }