zoukankan      html  css  js  c++  java
  • 关于打比赛总是拿不到衣服(呵呵)

    看来不是脸的问题,还是自己打比赛太少了……

     1 #include <cstdio>
     2 #include <cstdlib>
     3 #include <cmath>
     4 #include <cstring>
     5 #include <string>
     6 #include <set>
     7 #include <map>
     8 #include <list>
     9 #include <stack>
    10 #include <queue>
    11 #include <vector>
    12 #include <algorithm>
    13 #include <iostream>
    14 using namespace std;
    15 #define ll long long
    16 #define inf 1e9
    17 const long maxn=1e5+5;
    18 const ll mod=1e9+7;
    19 
    20 double p[10]={0.005,0.01,0.02,0.05};
    21 double q[10];
    22 
    23 int main()
    24 {
    25     long i;
    26     for (i=0;i<4;i++)
    27         q[i]=1-p[i];
    28     for (i=0;i<4;i++)
    29     {
    30         //q^t<0.5 t<log(0.5)/log(q) q<1,log(q)<>0
    31         printf("percentage = %.4f
    ",p[i]);
    32         printf("=0.5 times = %.4f
    ",log(1-0.5)/log(q[i]));
    33         printf("=0.8 times = %.4f
    ",log(1-0.8)/log(q[i]));
    34         printf("=0.9 times = %.4f
    ",log(1-0.9)/log(q[i]));
    35         printf("
    ");
    36     }
    37     return 0;
    38 }
  • 相关阅读:
    ISO 学习笔记 2015-03-15
    IOS 学习笔记 20150314
    IOS 学习日志 2015-3-13
    Letter Combinations of a Phone Number
    anagrams
    Pow(x, n)
    Distinct Subsequences
    Excel Sheet Column Number
    MIT 三课程
    c++ 重载,覆盖,重定义
  • 原文地址:https://www.cnblogs.com/cmyg/p/8969479.html
Copyright © 2011-2022 走看看