int main ()
{
int n, m;
while (~RII(n, m))
{
double ans = 0;
FE(Max, 1, n)
{
ans += Max * (pow((double)Max / n, m) - pow((Max - 1.0) / n, m));
}
printf("%.10f\n", ans);
}
return 0;
}Codeforces Round #259 (Div. 1)——Little Pony and Expected Maximum,布布扣,bubuko.com
Codeforces Round #259 (Div. 1)——Little Pony and Expected Maximum
原文:http://blog.csdn.net/wty__/article/details/38345949