#include <iostream> #include <string> #include <vector> #include <cmath> #include <algorithm> #include <cstdlib> #include <ctime> #include <cstdio> #include <functional> #include <set> #include <sstream> #include <cctype> using namespace std; int main(){ int n,k; cin>>n>>k; srand(time(NULL)); long win=0; for(long i=0;i<(2<<20);i++){ int jiro=0,taro=0; for(int j=0;j<n;j++) jiro+=(rand()%6+1); for(int j=0;j<n-k;j++) taro+=(rand()%6+1); for(int j=0;j<k;j++) taro+=(rand()%3+4); if(taro>jiro) win++; } printf("%.16f\n",(double)win/(2<<20)); return 0; }