#include using namespace std; int main() { int N, K; cin >> N >> K; mt19937 mt; int cnt = 0, MAX = 1000000; for (int times = 0; times < MAX; times++) { int tarou = 0, jirou = 0; for (int i = 0; i < N; i++) { jirou += mt() % 6 + 1; tarou += (i < K ? mt() % 3 + 4 : mt() % 6 + 1); } if (tarou > jirou) cnt++; } cout << (double)cnt / MAX << endl; }