#define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #include ///////// #define REP(i, x, n) for(int i = x; i < n; i++) #define rep(i,n) REP(i,0,n) #define P(p) cout<<(p)<>K; LD E[27]; for(int i=0;i<6;++i){ E[K+i] = 0.0; } for(int i=K-1;i>=0;--i){ E[i] = E[i+1]+E[i+2]+E[i+3]+E[i+4]+E[i+5]+E[i+6]+6; E[i] /= 6.0; } P(E[0]); return 0; }