Codeforces 453A Little Pony and Expected Maximum 2018-10-08 题解 Codeforces 评论 字数统计: 85(words) 题面在这里 \[ \sum_{i=1}^m i\cdot \left[\left( \frac i m \right)^n - \left( \frac {i-1} m \right)^n\right] \] 示例程序: 1234567891011#include<cstdio>#include<cmath>int n,m;int main(){ scanf("%d%d",&m,&n); double ans=0; for (int i=1;i<=m;i++) ans+=i*(pow(1.0*i/m,n)-pow(1.0*(i-1)/m,n)); printf("%.08f",ans); return 0;}