#include using namespace std; const int TRY = 10000000; int main() { cin.tie(0); ios::sync_with_stdio(false); srand((unsigned int)time(NULL)); int n, k; cin >> n >> k; int cnt = 0; for (int i = 0; i < TRY; i++) { int taro = 0, jiro = 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) cnt += 1; } cout << cnt * 1.0 / TRY << endl; return 0; }