一道经典的智力题(12球称三次找出异常一球)
<b>一道经典的智力题(12球称三次找出异常一球)</b><br><br>
<b></b>有十二个乒乓球特征相同,其中只有一个重量<b>异常</b>,现在要求用一部没有砝码的天平称三次,将那个重量异常的球找出来。 <br>
<br>
评分标准: <br>
1、30分钟以内做出来:智力很高很高很高,不知道有多高。 <br>
2、60分钟以内做出来:智力很高。 <br>
3、两小时内做出来: 智力相当高。 <br>
4、1天或者1周内做出来:智力也很高,而且还是一个有毅力的人。 <br>
5、10分钟内做出来:你或者以前做过,或者多半是个马虎的人。<br>
<br>
这里的问题关键是异常,所以不知道是轻了,还是重了,并且解题最后还要知道这球是轻还是重了。<br>
<br>
这个问题是我偶而在论坛里看到的,我向来是觉得自己的智商还成,但一小时过去,我没有能解出来,就放弃了,当然我,仍然没有放过 google ,大致知道了解法。<br>
<br>
终于,看到了我们站点的第一智商的 qiushuiwuhen 在 2002 年中,用JS写的解法,非常的棒,有兴趣的人可以先自己解一下这个题(哈哈,计一下时,另不准上网搜索),回头再看看他的JS,学习一下他的方法。他的解法,我放在下一页了。大家要忍住不要点哦。<br>
<br>
re:在12个小球中有一个和其他不同(或...
在12个小球中有一个和其他不同(或轻或重),现在先拿起笔,记下哪个球重或者轻,然后继续下面的游戏<br><br><br><br><select name=one></select><br>
<select name=two></select><br>
<select name=three></select><br>
<select name=four></select><br>
<br>
<script><br>
var arrSel=["one","two","three","four"];//arrSel定义了要修改的下拉框<br>
var i=0,arrData=[];//arrData中搁的是数据,每条都显示各级的数据<br>
arrData=["(1,2,3,4)比(5,6,7,8)","请先做前面的选择","请先做前面的选择","请先做前面的选择"]<br>
arrData=["重","(1,2,5)比(3,6,9)","请先做前面的选择","请先做前面的选择"]<br>
arrData=["重","重","(1)比(2)","请先做前面的选择"]<br>
arrData=["重","重","重","1球比较重"]<br>
arrData=["重","重","平","6球比较轻"]<br>
arrData=["重","重","轻","2球比较重"]<br>
arrData=["重","平","(7)比(8)","请先做前面的选择"]<br>
arrData=["重","平","重","8球比较轻"]<br>
arrData=["重","平","平","4球比较重"]<br>
arrData=["重","平","轻","7球比较轻"]<br>
arrData=["重","轻","(1)比(3)","请先做前面的选择"]<br>
arrData=["重","轻","重","无解"]<br>
arrData=["重","轻","平","5球比较轻"]<br>
arrData=["重","轻","轻","3球比较重"]<br>
arrData=["平","(9,10)比(1,11)","请先做前面的选择","请先做前面的选择"]<br>
arrData=["平","重","(9)比(11)","请先做前面的选择"]<br>
arrData=["平","重","重","9球比较重"]<br>
arrData=["平","重","平","11球比较轻"]<br>
arrData=["平","重","轻","10球比较重"]<br>
arrData=["平","平","(1)比(12)","请先做前面的选择"]<br>
arrData=["平","平","重","12球比较轻"]<br>
arrData=["平","平","平","无解"]<br>
arrData=["平","平","轻","12球比较重"]<br>
arrData=["平","轻","(9)比(10)","请先做前面的选择"]<br>
arrData=["平","轻","重","9球比较轻"]<br>
arrData=["平","轻","平","11球比较重"]<br>
arrData=["平","轻","轻","10球比较轻"]<br>
arrData=["轻","(1,2,5)比(3,6,9)","请先做前面的选择","请先做前面的选择"]<br>
arrData=["轻","重","(1)比(3)","请先做前面的选择"]<br>
arrData=["轻","重","重","3球比较轻"]<br>
arrData=["轻","重","平","5球比较重"]<br>
arrData=["轻","重","轻","无解"]<br>
arrData=["轻","平","(7)比(8)","请先做前面的选择"]<br>
arrData=["轻","平","重","7球比较重"]<br>
arrData=["轻","平","平","4球比较轻"]<br>
arrData=["轻","平","轻","8球比较重"]<br>
arrData=["轻","轻","(1)比(2)","请先做前面的选择"]<br>
arrData=["轻","轻","重","2球比较轻"]<br>
arrData=["轻","轻","平","6球比较重"]<br>
arrData=["轻","轻","轻","1球比较轻"]<br>
</script><br>
<script><br>
function qswhInit(num){<br>
/******* by qiushuiwuhen(2002-5-15) ********/<br>var i,j,arrTemp=[];<br>for(i=0;i<num;i++)arrTemp<i>=document.all(arrSel<i>).options.text<br>if(num==arrSel.length){//这里处理最后的数据。<br>return;<br>}<br>with(document.all(arrSel)){<br>length=0<br>for(i=0;i<arrData.length;i++){ <br>for(j=0;j<num;j++)if(arrTemp!=arrData<i>)break;<br>if(j!=num)continue;<br>if(length==0||options.text!=arrData<i>)<br>options.text=arrData<i>;<br>}<br>onchange=new Function("qswhInit("+(num+1)+")");<br>onchange();<br>}<br>
}<br>
qswhInit(0);//初始化<br>
</script><br>
<br>
<br>
re:楼主啊~!这道题目在幽默与灌水里我已...
楼主啊~!<br>这道题目在幽默与灌水里我已经答过了呢~!
re:是啊!
是啊!
页:
[1]