import std.stdio; import std.conv; import std.random; import std.algorithm; int taro(int n, int k){ int arr; foreach(i; 0..k){ arr += [4, 4, 5, 5, 6, 6][uniform(0, 6)]; } foreach(i; k..n){ arr += [1, 2, 3, 4, 5, 6][uniform(0, 6)]; } return arr; } int jiro(int n){ int arr; foreach(i; 0..n){ arr += [1, 2, 3, 4, 5, 6][uniform(0, 6)]; } return arr; } void main(){ int n, k; readf("%d\n%d", &n, &k); int win = 0; int times = 1000000; foreach(t; 0..times){ if(taro(n, k) > jiro(n)) win++; } writeln(cast(real) win/times); }