import std.stdio, std.array, std.conv, std.string, std.algorithm, std.math, std.regex; void main(){ int n, k; readf("%d %d\n", &n, &k); double rateVal, rate; rate = 0; rateVal = 1/( to!(float)((n+1)*k) ); for(int i; i<=n; i++){ rate += rateVal*to!(double)(i*k); } rate.writeln(); } // 読み込み用 T readOne(T=size_t)(){ return readln().chomp().split[0].to!T(); } T[] readLine(T=size_t)(string op=" "){ T[] ol; foreach(string elm; readln().chomp().split(op)){ ol ~= elm.to!T(); } return ol; }