10056 - What is the Probability ?
来源:互联网 发布:网络运维投标书 编辑:程序博客网 时间:2024/05/01 16:25
/*简单概率题,一次AC*/#include <cstdio>int main(){//freopen("f://data.in", "r", stdin);int T;scanf("%d", &T);while(T--){int N, I;double p;scanf("%d %lf %d", &N, &p, &I);double q, t;int i;for(i = 0, t = 1; i < N; ++ i)t *= (1 - p);for(q = p, i = 1; i < I; ++ i)q *= (1 - p);double ans = q;while(q > 1e-6){q *= t;ans += q;}printf("%.4lf\n", ans);}return 0;}
- 10056 - What is the Probability ?
- 10056 - What is the Probability ?
- 10056 - What is the Probability --水题
- 10056 - What is the Probability ? 解题报告
- uva 10056 - What is the Probability ?
- UVA - 10056 What is the Probability ?
- UVa:10056 What is the Probability ?
- UVa 10056 — What is the Probability?
- uva 10056 What is the Probability ?
- What is the Probability - UVa 10056 概率
- UVA - 10056 What is the Probability ?
- UVA 10056 What is the Probability ?
- UVA - 10056 What is the Probability ? 概率UVA - 10056 What is the Probability ?
- UVa 10056 What is the Probability ? (概率&有一个陷阱)
- uva 10056 - What is the Probability ?(概率)
- UVA 10056 - What is the Probability ?(概率)
- UVa 10056 - What is the Probability ?(等比数列求极限)
- uva 10056 What is the Probability ?(简单概率)
- 详解笔记本屏幕
- javascript调用js文件
- 关于ARM 汇编 指令 操作范围的一点理解
- 量变确实可以引起质变
- 笔记本屏幕技术
- 10056 - What is the Probability ?
- 基于XML-RPC的远程调用(Python,Java)
- 教你轻松解决Oracle数据库的服务启动问题
- POJ 1562
- 笔记本知识文集-屏幕知识
- andriod目录
- POJ 1562
- 精典FormsAuthenticationTicket 分析
- javascript变量使用