import std.algorithm, std.array, std.container, std.range; import std.string, std.conv, std.math, std.random; import std.stdio, std.typecons; alias Tuple!(int, "x", int, "y") point; void main() { auto n = readln.chomp.to!int; auto k = readln.chomp.to!int; const a = 2000000; auto r = 0; foreach (i; 0..a) { auto t1 = iota(k).map!(j => uniform(4, 7)).sum; auto t2 = iota(n - k).map!(j => uniform(1, 7)).sum; auto ji = iota(n).map!(j => uniform(1, 7)).sum; if (t1 + t2 > ji) r += 1; } writefln("%f", r.to!real / a); }