标题:请教一个概率的问题
只看楼主
ioriliao
Rank: 7Rank: 7Rank: 7
来 自:广东
等 级:贵宾
威 望:32
帖 子:2829
专家分:647
注 册:2006-11-30
结帖率:78.95%
 问题点数:0 回复次数:3 
请教一个概率的问题
假如有一彩票在十一(1-11)个数中选择五个数中了就中奖。
假设在1 2 6 8 11中至少出现2个数,在1 2 3 5 7 9 10 11中至少会出现3个数,
在1 2 8中至少会出现1个数,在3 4 7 10中至少会出现1个数,在3 4 5 7 9 10中至少出现2个数。
请问下一期彩票会开哪些数。
搜索更多相关主题的帖子: 概率 
2010-03-14 19:53
hahayezhe
Rank: 15Rank: 15Rank: 15Rank: 15Rank: 15
来 自:湖南张家界
等 级:贵宾
威 望:24
帖 子:1386
专家分:6999
注 册:2010-3-8
得分:0 
占个位子 期待那位大大解决
2010-03-14 20:31
寒风中的细雨
Rank: 17Rank: 17Rank: 17Rank: 17Rank: 17
等 级:贵宾
威 望:66
帖 子:1710
专家分:8645
注 册:2009-9-15
得分:0 
#include <stdio.h>

void main()
{
    int a[5];
    int b = 0, c = 0, d = 0, m = 0, n = 0;
    int i;
   
    a[0] = 1;
    for( ; a[0]<8; a[0]++)
        for( a[1] = a[0]+1; a[1]<9; a[1]++)
            for( a[2] = a[1]+1; a[2]<10; a[2]++)
                for( a[3] = a[2]+1; a[3]<11; a[3]++)
                    for( a[4] = a[3]+1; a[4]<12; a[4]++)
                    {
                        for( i = 0; i<4 ; i++)
                        {
                            if( (a[i]==1) || (a[i]==2) )
                            {
                                b++;
                                c++;
                                d++;
                            }
                            if( a[i]==8 )
                            {
                                b++;
                                d++;
                            }
                            if( a[i]==3 )
                            {
                                c++;
                                m++;
                                n++;
                            }
                            if( (a[i]==4) || (a[i]==7) || (a[i]==10))
                            {
                                m++;
                                n++;
                            }
                            if( (a[i]==5) || (a[i]==9) )
                            {
                                c++;
                                n++;
                            }
                            if( (a[i]==6) || (a[i]==11) )
                                b++;
                            if( (a[i]==7) || (a[i]==10) || (a[i]==11) )
                                c++;
                        }
                        if( (b>=2) && (c>=3) && (d>=1) && (m>=1) && (n>=2))
                        {
                            for( i = 0; i<5; i++)
                                printf("%d ",a[i]);
                            printf("\n");
                        }
                    }
}
                    
2010-03-14 22:06
寒风中的细雨
Rank: 17Rank: 17Rank: 17Rank: 17Rank: 17
等 级:贵宾
威 望:66
帖 子:1710
专家分:8645
注 册:2009-9-15
得分:0 
这是什么概率题啊
   刚开始还搞的 人家去算概率去啦
2010-03-14 22:10



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-299415-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.386275 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved