设为首页 加入收藏

TOP

Codeforces Round #259 (Div. 2)(二)
2015-07-20 18:01:25 来源: 作者: 【 】 浏览:6
Tags:Codeforces Round #259 Div.
of each outcome is 0.25, that is expectation equals to:

\

You can read about expectation using the following link: http://en.wikipedia.org/wiki/Expected_value

#include
     
      
#include
      
        int main() { int m,n; scanf("%d%d",&m,&n); double ans=0; for(int i=1;i<=m-1;i++) ans+=pow(1.0*i/m,n); printf("%.12lf\n",m-ans); return 0; }
      
     



首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇HDU 4902 Nice boat(线段树) 下一篇poj3436 ACM Computer Factory, ..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: