#include #include using namespace atcoder; using namespace std; using ll=long long; using ld=long double; ld pie=3.141592653589793; ll mod=998244353; ll inf=1009999999999999990; int main(){ ll n,k; cin >> n >> k; ld ans=0; for (ll i = 0; i < 10000000; i++) { ll x=0; for (ll j = 0; j < k; j++) { x+=rand()%3+4; } for (ll j = 0; j < n-k; j++) { x+=rand()%6+1; } for (ll j = 0; j < n; j++) { x-=rand()%6+1; } if (x>0) { ans++; } } ans/=10000000.0; cout << setprecision(100) << ans << endl; }