using System; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; using System.Text; using System.Text.RegularExpressions; using System.Linq; class Magatro { static int N, K; static long[] Tcnt = new long[61], Zcnt = new long[61]; const int MAX = 2000000; static void Main() { N = int.Parse(Console.ReadLine()); K = int.Parse(Console.ReadLine()); int cnt = 0; Random rnd = new Random(); for(int i = 0; i < MAX; i++) { int taro = 0, ziro = 0; for(int j = 0; j < N; j++) { ziro += rnd.Next(1, 6+1); if (j <= K - 1) { taro += rnd.Next(4, 6+1); } else { taro += rnd.Next(1, 6+1); } } if (taro > ziro) { cnt++; } } Console.WriteLine((double)cnt / MAX); } }