BestCoder Round #26
来源:互联网 发布:少儿学编程的优势 编辑:程序博客网 时间:2024/06/07 02:35
1001 Have meal
->点我传送<-
#include<iostream>#include<cstring>#include<cstdio>using namespace std;int main(){ int n,m; while(~scanf("%d%d",&n,&m)){ int ans=(m-1)%n; printf("%d\n",ans); } return 0;}
1002 card
->点我传送<-
#include<iostream>#include<cstring>#include<cstdio>using namespace std;int main(){ int t,cnt=1;scanf("%d",&t); while(t--){ int x,b;double p=1.0; scanf("%d%d",&x,&b); for(int i=0;i<b;i++){ p*=(1-1/(x*1.0)); } double ans=(1-p)*x*(x+1)/2.0; printf("Case #%d: %.3f\n",cnt++,ans); } return 0;}
未完待续……
0 0
- BestCoder Round #26
- BestCoder Round #26 HDU5158 Have meal
- BestCoder Round #3 BestCoder Sequence
- bestcoder round #1
- BestCoder round #1
- BestCoder Round #1
- 【索引】BestCoder Round #2
- BestCoder Round #2
- 【索引】BestCoder Round #3
- BestCoder Round #3
- BestCoder Round #3 小记
- BestCoder Round #4 题解
- BestCoder Round #6
- BestCoder Round #8
- Bestcoder Round #9
- BestCoder Round #9
- BestCoder Round #13(前两题)
- BestCoder Round #14
- C++11 VS2012 regex正则表达式崩溃sregex_token_iterator
- CSS-填充
- 排名机制 营造的环境,产业链。
- 通常会选择 便宜的,性价比高的。
- PAT-A 1083. List Grades
- BestCoder Round #26
- mysq绿色版安装
- POJ 2096 Collecting Bugs(期望DP)
- CodeForces 686C Robbers' watch (dfs)
- Caffe | 建新层纪要
- jsp中jstl标签库 function /i18n
- 枚举所有文档
- Linux_GPIO及中断API函数
- PAT-A 1084. Broken Keyboard