标签:http os io for ar type ios c
题目链接:点击打开链接
#include <stdio.h> #include <iostream> #include <algorithm> using namespace std; #define INF 0x3f3f3f3f #define eps 1e-8 #define pi acos(-1.0) typedef long long ll; int main() { int i, j; double m,n; while(cin>>m>>n){ double ans=m; for(i=1;i<=m;i++) ans-=pow((i-1)*1.0/(m),n); printf("%.10lf\n",ans); } return 0; }
Codeforces 453A Little Pony and Expected Maximum 概率题Orz,布布扣,bubuko.com
Codeforces 453A Little Pony and Expected Maximum 概率题Orz
标签:http os io for ar type ios c
原文地址:http://blog.csdn.net/qq574857122/article/details/38350251