概率
来源:互联网 发布:手机版希沃白板软件 编辑:程序博客网 时间:2024/04/28 04:42
Description
Sometimes some mathematical results are hard to believe. One of the common problems is the birthday paradox. Suppose you are in a party where there are 23 people including you. What is the probability that at least two people in the party have same birthday? Surprisingly the result is more than 0.5. Now here you have to do the opposite. You have given the number of days in a year. Remember that you can be in a different planet, for example, in Mars, a year is 669 days long. You have to find the minimum number of people you have to invite in a party such that the probability of at least two people in the party have same birthday is at least 0.5.
Input
Input starts with an integer T (≤ 20000), denoting the number of test cases.
Each case contains an integer n (1 ≤ n ≤ 105) in a single line, denoting the number of days in a year in the planet.
Output
For each case, print the case number and the desired result.
Sample Input
2
365
669
Sample Output
Case 1: 22
Case 2: 30
- 概率
- 概率
- 概率
- 概率
- 概率
- 概率
- 概率
- 概率
- 概率
- 概率
- 概率, 还是概率!
- 概率、先验概率、后验概率
- 概率,先验概率与后验概率
- 概率、先验概率、后验概率
- 概率,先验概率,后验概率
- 概率,先验概率,后验概率
- 先验概率、后验概率、条件概率
- 概率、先验概率、后验概率
- Android Studio2.0以上反射$change属性问题
- java synchronized线程同步
- HTMLCSS基础-标签默认样式值重置
- 高斯消元 hdu5833,hdu3364,hihocoder1195
- Maven学习 (一) 搭建Maven环境
- 概率
- Android react native 入门
- 实施大数据应用?别忘了搜索!
- 关于ClassNOtFoundException异常
- jquery根据name属性查找
- 我的大学到研究生回顾——大学(二)
- 8.5 Map
- css 没有宽度和高度声明实现的全屏自适应效果
- //两种方法设置disabled属性