#include #include using namespace std; using vd=vector; using vi=vector; int main(void) { vi n; vd c, p, table; int t, table_max=1000; long double r[6+1]={0.0, 0.5/6, 1.0/6, 1.5/6, 0.5/6, 1.5/6}; r[6]=1.0-r[1]-r[2]-r[3]-r[4]-r[5]; while(scanf("%d", &t)==1) { n.resize(t); for(int i=0;itable_max+1) idx=table_max+1; c[idx]+=p[j]*r[k]; for(int l=j+1;l<=idx;l++) { table[l]+=p[j]*r[k]*i; } } } } // for(auto&te:table) printf("%.8f\n", (double)te); // for(int i=0;i