<>答案是:1/9877</P>
<>我用穷举法算的,应该对吧。</P>
<>#include <stdio.h><BR>void main(){<BR> int i,j,k,m,n,sum=0;<BR> for(i=1;i<=37;i++){<BR> m=40-i;<BR> if(m>37)m=37;<BR> for(j=1;j<=m;j++){<BR> n=40-i-j;<BR> if(n>37)n=37;<BR> for(k=1;k<=n;k++)<BR> sum++;<BR> }<BR> };<BR> printf("概率是:%d分之一(%lf)\n",sum,1.0/sum);<BR>}</P> |