爱因斯坦的智力题
1、在一条街上,有5座房子,喷了5种颜色。2、每个房里住着不同国籍的人3、每个人喝不同的饮料,抽不同品牌的香烟,养不同的宠物问题是:谁养鱼?提示:1、英国人住红色房子2、...
1、在一条街上,有5座房子,喷了5种颜色。
2、每个房里住着不同国籍的人
3、每个人喝不同的饮料,抽不同品牌的香烟,养不同的宠物
问题是:谁养鱼?
提示:
1、英国人住红色房子
2、瑞典人养狗
3、丹麦人喝茶
4、绿色房子在白色房子左面
5、绿色房子主人喝咖啡
6、抽Pall Mall 香烟的人养鸟
7、黄色房子主人抽Dunhill 香烟
8、住在中间房子的人喝牛奶
9、 挪威人住第一间房
10、抽Blends香烟的人住在养猫的人隔壁
11、养马的人住抽Dunhill 香烟的人隔壁
12、抽Blue Master的人喝啤酒
13、德国人抽Prince香烟
14、挪威人住蓝色房子隔壁
15、抽Blends香烟的人有一个喝水的邻居
以上是爱因斯坦在20世纪初出的这个谜语。他说世界上有98%的人答不出来。
你能做出来吗? 展开
2、每个房里住着不同国籍的人
3、每个人喝不同的饮料,抽不同品牌的香烟,养不同的宠物
问题是:谁养鱼?
提示:
1、英国人住红色房子
2、瑞典人养狗
3、丹麦人喝茶
4、绿色房子在白色房子左面
5、绿色房子主人喝咖啡
6、抽Pall Mall 香烟的人养鸟
7、黄色房子主人抽Dunhill 香烟
8、住在中间房子的人喝牛奶
9、 挪威人住第一间房
10、抽Blends香烟的人住在养猫的人隔壁
11、养马的人住抽Dunhill 香烟的人隔壁
12、抽Blue Master的人喝啤酒
13、德国人抽Prince香烟
14、挪威人住蓝色房子隔壁
15、抽Blends香烟的人有一个喝水的邻居
以上是爱因斯坦在20世纪初出的这个谜语。他说世界上有98%的人答不出来。
你能做出来吗? 展开
7个回答
展开全部
使用Asp程序来解答
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
Dim Color
Num = Array(1,2,3,4,5)
Country = Array("英国人","瑞典人","丹麦人","德国人","挪威人")
Drink = Array("茶","咖啡","牛奶","啤酒","水")
Smking = Array("PALL MALL","DUNHILL","BLUE MASTER","PRINCE","混合")
Pet = Array("狗","鸟","猫","马","鱼")
House = Array("红房子","绿房子","黄房子","蓝房子","白房子")
%>
1. 有5栋5种颜色的房子
2. 每一位房子的主人国籍都不同
3. 这5个人每人只喝一个牌子的饮料, 只抽一个牌子的香烟, 只养一种宠物
4. 没有人有相同的宠物, 抽相同牌子的香烟, 喝相同的饮料
已知: <br>
<% info = split("1. 英国人住在红房子里|2. 瑞典人养了一条狗|3. 丹麦人喝茶|4. 绿房子在白房子左边|5. 绿房子主人喝咖啡|6. 抽PALL MALL烟的人养了一只鸟|7. 黄房子主人抽DUNHILL烟 |8. 住在中间那间房子的人喝牛奶 |9. 挪威人住在num=1房子 |10. 抽混合烟的人住在养猫人的旁边| 11. 养马人住在DUNHILL烟的人旁边| 12. 抽BLUE MASTER烟的人喝啤酒 |13. 德国人抽PRINCE烟 |14. 挪威人住在蓝房子旁边 |15. 抽混合烟的人的邻居喝矿泉水","|")
Response.Write(join(info,"<br>"))
rt = true
xx = 0
Dim Arr(81)
Dim ArrInfo(6,81)
function Getstr()
For i = 1 to 5
For j = 0 to 4
For k = 0 to 4
For l = 0 to 4
For m = 0 to 4
For n = 0 to 4
nm = i
cty=country(j)
Drk=Drink(k)
smk = Smking(l)
hr = house(m)
pt=pet(n)
Call check(nm,cty,drk,smk,hr,pt)
Next
Next
Next
Next
Next
Next
End Function
Response.write "<br>"
getStr
%>
<%
Sub check(nm,cty,drk,smk,hr,pt)
Dim rt
rt=true
If cty="英国人" Then
If hr <> "红房子" Then
Exit Sub
End If
End If
If cty="瑞典人" Then
IF pt <> "狗" Then
Exit Sub
End if
End If
If pt = "狗" Then
IF cty<>"瑞典人" Then
Exit Sub
End if
End If
If cty="丹麦人" Then
IF drk <> "茶" Then
Exit Sub
End if
End If
If drk = "茶" Then
IF cty<>"丹麦人" Then
Exit Sub
End if
End If
If hr="绿房子" Then
IF drk <> "咖啡" Then
Exit Sub
End if
End If
If drk = "咖啡" Then
IF hr<>"绿房子" Then
Exit Sub
End if
End If
If pt = "鸟" Then
IF smk<>"PALL MALL" Then
Exit Sub
End if
End If
If smk="PALL MALL" Then
IF pt <> "鸟" Then
Exit Sub
End if
End If
If smk = "DUNHILL" Then
IF hr<>"黄房子" Then
Exit Sub
End if
End If
If hr="黄房子" Then
IF smk <> "DUNHILL" Then
Exit Sub
End if
End If
If drk = "牛奶" Then
IF nm<>3 Then
Exit Sub
End if
End If
If nm=3 Then
IF drk <> "牛奶" Then
Exit Sub
End if
End If
If cty="挪威人" Then
IF nm <> 1 Then
Exit Sub
End if
End If
If nm = 1 Then
IF cty <> "挪威人" Then
Exit Sub
End if
End If
If SMK="BLUE MASTER" Then
IF drk <> "啤酒" Then
Exit Sub
End if
End If
If drk = "啤酒" Then
IF SMK<>"BLUE MASTER" Then
Exit Sub
End if
End If
If cty="德国人" Then
IF smk <> "PRINCE" Then
Exit Sub
End if
End If
If smk = "PRINCE" Then
IF cty<>"德国人" Then
Exit Sub
End if
End If
If NM = 2 Then
IF hr <> "蓝房子" Then
Exit Sub
End if
End If
If hr="蓝房子" Then
IF NM <> 2 Then
Exit Sub
End if
End If
If SMk = "混合" And pt="猫" Then
Exit Sub
End If
If SMk = "混合" And Drk="水" Then
Exit Sub
End If
If pt="马" And SMk = "DUNHILL" Then
Exit Sub
End If
ArrInfo(0,xx) = nm
ArrInfo(1,xx) = cty
ArrInfo(2,xx) = Drk
ArrInfo(3,xx) = Smk
ArrInfo(4,xx) = hr
ArrInfo(5,xx) = pt
ArrInfo(6,xx) = xx
xx = xx + 1
End Sub
Dim n1,n2,n3,n4,n5
n1=0
n2=0
n3=0
n4=0
n5=0
For i = 0 to ubound(arrInfo,2)
For j=0 to 6
'Response.write(arrInfo(j,i)&".")
Next
Select Case arrInfo(0,i)
Case 1
n1 = n1 + 1
Case 2
n2 = n2 + 1
Case 3
n3= n3 + 1
Case 4
n4 = n4 + 1
Case 5
n5 = n5 + 1
End Select
'Response.Write("<br/>")
Next
Dim arrInfo1(),arrInfo2(),arrInfo3(),arrInfo4(),arrInfo5()
Redim arrInfo1(6,n1-1)
Redim arrInfo2(6,n2-1)
Redim arrInfo3(6,n3-1)
Redim arrInfo4(6,n4-1)
Redim arrInfo5(6,n5-1)
x1=0
x2=0
x3=0
x4=0
x5=0
For i = 0 to ubound(arrInfo,2)
Select Case arrInfo(0,i)
Case 1
For j=0 to 6
arrInfo1(j,x1) =arrInfo(j,i)
Next
x1 = x1 + 1
Case 2
For j=0 to 6
arrInfo2(j,x2) =arrInfo(j,i)
Next
x2 = x2 + 1
Case 3
For j=0 to 6
arrInfo3(j,x3) =arrInfo(j,i)
Next
x3 = x3 + 1
Case 4
For j=0 to 6
arrInfo4(j,x4) =arrInfo(j,i)
Next
x4 = x4 + 1
Case 5
For j=0 to 6
arrInfo5(j,x5) =arrInfo(j,i)
Next
x5 = x5 + 1
End Select
Next
For i = 0 to ubound(arrInfo1,2)
For j = 0 to ubound(arrInfo2,2)
For k = 0 to ubound(arrInfo3,2)
For l = 0 to ubound(arrInfo4,2)
For m = 0 to ubound(arrInfo5,2)
If chkR(i,j,k,l,m) = True Then
Response.Write("<br/>==============================================================<br>")
Response.Write(arrInfo1(0,i)&"."&arrInfo1(1,i)&"."&arrInfo1(2,i)&"."&arrInfo1(3,i)&_
"."&arrInfo1(4,i)&"."&arrInfo1(5,i)&"."&arrInfo1(6,i)&"<br>")
Response.Write(arrInfo2(0,j)&"."&arrInfo2(1,j)&"."&arrInfo2(2,j)&"."&arrInfo2(3,j)&_
"."&arrInfo2(4,j)&"."&arrInfo2(5,j)&"."&arrInfo2(6,j)&"<br>")
Response.Write(arrInfo3(0,k)&"."&arrInfo3(1,k)&"."&arrInfo3(2,k)&"."&arrInfo3(3,k)&_
"."&arrInfo3(4,k)&"."&arrInfo3(5,k)&"."&arrInfo3(6,k)&"<br>")
Response.Write(arrInfo4(0,l)&"."&arrInfo4(1,l)&"."&arrInfo4(2,l)&"."&arrInfo4(3,l)&_
"."&arrInfo4(4,l)&"."&arrInfo4(5,l)&"."&arrInfo4(6,l)&"<br>")
Response.Write(arrInfo5(0,m)&"."&arrInfo5(1,m)&"."&arrInfo5(2,m)&"."&arrInfo5(3,m)&_
"."&arrInfo5(4,m)&"."&arrInfo5(5,m)&"."&arrInfo5(6,m)&"<br>")
Response.Write("<br/>================================================================<br>")
Response.Flush()
End If
Next
Next
Next
Next
Next
Function ChkR(i,j,k,l,m)
for n=0 to 6
if arrInfo2(n,j) = arrInfo1(n,i) Or arrInfo3(n,k) = arrInfo1(n,i) Or arrInfo4(n,l) = arrInfo1(n,i) Or arrInfo5(n,m) = arrInfo1(n,i) Then
chkR = False
Exit Function
End If
if arrInfo1(n,i)=arrInfo2(n,j) Or arrInfo3(n,k) = arrInfo2(n,j) Or arrInfo4(n,l) = arrInfo2(n,j) Or arrInfo5(n,m) = arrInfo2(n,j) Then
chkR = False
Exit Function
End If
if arrInfo2(n,j) = arrInfo3(n,k) Or arrInfo1(n,i) = arrInfo3(n,k) Or arrInfo4(n,l) = arrInfo3(n,k) Or arrInfo5(n,m) = arrInfo3(n,k) Then
chkR = False
Exit Function
End If
if arrInfo2(n,j) = arrInfo4(n,l) Or arrInfo3(n,k) = arrInfo4(n,l) Or arrInfo1(n,i) = arrInfo4(n,l) Or arrInfo5(n,m) = arrInfo4(n,l) Then
chkR = False
Exit Function
End If
if arrInfo2(n,j) = arrInfo5(n,m) Or arrInfo3(n,k) = arrInfo5(n,m) Or arrInfo4(n,l) = arrInfo5(n,m) Or arrInfo1(n,i) = arrInfo5(n,m) Then
chkR = False
Exit Function
End If
next
'抽混合烟的人住在养猫人的旁边
If arrInfo1(3,i)="混合" Then
If arrInfo2(5,j) <> "猫" Or arrInfo2(2,j) <> "水" Then
chkR = False
Exit Function
End If
End If
If arrInfo2(3,j)="混合" Then
If arrInfo1(5,i) <> "猫" And arrInfo3(5,k) <> "猫" Then
chkR = False
Exit Function
End If
If arrInfo1(2,i) <> "水" And arrInfo3(2,k) <> "水" Then
chkR = False
Exit Function
End If
End If
If arrInfo3(3,k)="混合" Then
If arrInfo2(5,j) <> "猫" And arrInfo4(5,l) <> "猫" Then
chkR = False
Exit Function
End If
If arrInfo2(2,j) <> "水" And arrInfo4(2,l) <> "水" Then
chkR = False
Exit Function
End If
End If
If arrInfo4(3,l)="混合" Then
If arrInfo3(5,k) <> "猫" And arrInfo5(5,m) <> "猫" Then
chkR = False
Exit Function
End If
If arrInfo3(2,k) <> "水" And arrInfo5(2,m) <> "水" Then
chkR = False
Exit Function
End If
End If
If arrInfo5(3,m)="混合" Then
If arrInfo4(5,l) <> "猫" Then
chkR = False
Exit Function
End If
If arrInfo4(2,l) <> "水" Then
chkR = False
Exit Function
End If
End If
'养马人住在DUNHILL烟的人旁边
If arrInfo1(5,i)="马" Then
If arrInfo2(3,j) <> "DUNHILL" Then
chkR = False
Exit Function
End If
End If
If arrInfo2(5,j)="马" Then
If arrInfo1(3,i) <> "DUNHILL" And arrInfo3(3,k) <> "DUNHILL" Then
chkR = False
Exit Function
End If
End If
If arrInfo3(5,k)="马" Then
If arrInfo2(3,j) <> "DUNHILL" And arrInfo4(3,l) <> "DUNHILL" Then
chkR = False
Exit Function
End If
End If
If arrInfo4(5,l)="马" Then
If arrInfo3(3,k) <> "DUNHILL" And arrInfo5(3,m) <> "DUNHILL" Then
chkR = False
Exit Function
End If
End If
If arrInfo5(5,m)="马" Then
If arrInfo4(3,l) <> "DUNHILL" Then
chkR = False
Exit Function
End If
End If
'绿房子在白房子的左边
If arrInfo1(4,i)="绿房子" Then
If arrInfo2(4,j)<>"白房子" Then
chkR = False
Exit Function
End If
End If
If arrInfo2(4,j)="绿房子" Then
If arrInfo3(4,k)<>"白房子" Then
chkR = False
Exit Function
End If
End If
If arrInfo3(4,k)="绿房子" Then
If arrInfo4(4,l)<>"白房子" Then
chkR = False
Exit Function
End If
End If
If arrInfo4(4,l)="绿房子" Then
If arrInfo5(4,m)<>"白房子" Then
chkR = False
Exit Function
End If
End If
chkR = True
End function
%>
==============================================================
1.挪威人.水.DUNHILL.黄房子.猫.11
2.丹麦人.茶.混合.蓝房子.马.15
3.英国人.牛奶.PALL MALL.红房子.鸟.20
4.德国人.咖啡.PRINCE.绿房子.鱼.50
5.瑞典人.啤酒.BLUE MASTER.白房子.狗.63
================================================================
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
Dim Color
Num = Array(1,2,3,4,5)
Country = Array("英国人","瑞典人","丹麦人","德国人","挪威人")
Drink = Array("茶","咖啡","牛奶","啤酒","水")
Smking = Array("PALL MALL","DUNHILL","BLUE MASTER","PRINCE","混合")
Pet = Array("狗","鸟","猫","马","鱼")
House = Array("红房子","绿房子","黄房子","蓝房子","白房子")
%>
1. 有5栋5种颜色的房子
2. 每一位房子的主人国籍都不同
3. 这5个人每人只喝一个牌子的饮料, 只抽一个牌子的香烟, 只养一种宠物
4. 没有人有相同的宠物, 抽相同牌子的香烟, 喝相同的饮料
已知: <br>
<% info = split("1. 英国人住在红房子里|2. 瑞典人养了一条狗|3. 丹麦人喝茶|4. 绿房子在白房子左边|5. 绿房子主人喝咖啡|6. 抽PALL MALL烟的人养了一只鸟|7. 黄房子主人抽DUNHILL烟 |8. 住在中间那间房子的人喝牛奶 |9. 挪威人住在num=1房子 |10. 抽混合烟的人住在养猫人的旁边| 11. 养马人住在DUNHILL烟的人旁边| 12. 抽BLUE MASTER烟的人喝啤酒 |13. 德国人抽PRINCE烟 |14. 挪威人住在蓝房子旁边 |15. 抽混合烟的人的邻居喝矿泉水","|")
Response.Write(join(info,"<br>"))
rt = true
xx = 0
Dim Arr(81)
Dim ArrInfo(6,81)
function Getstr()
For i = 1 to 5
For j = 0 to 4
For k = 0 to 4
For l = 0 to 4
For m = 0 to 4
For n = 0 to 4
nm = i
cty=country(j)
Drk=Drink(k)
smk = Smking(l)
hr = house(m)
pt=pet(n)
Call check(nm,cty,drk,smk,hr,pt)
Next
Next
Next
Next
Next
Next
End Function
Response.write "<br>"
getStr
%>
<%
Sub check(nm,cty,drk,smk,hr,pt)
Dim rt
rt=true
If cty="英国人" Then
If hr <> "红房子" Then
Exit Sub
End If
End If
If cty="瑞典人" Then
IF pt <> "狗" Then
Exit Sub
End if
End If
If pt = "狗" Then
IF cty<>"瑞典人" Then
Exit Sub
End if
End If
If cty="丹麦人" Then
IF drk <> "茶" Then
Exit Sub
End if
End If
If drk = "茶" Then
IF cty<>"丹麦人" Then
Exit Sub
End if
End If
If hr="绿房子" Then
IF drk <> "咖啡" Then
Exit Sub
End if
End If
If drk = "咖啡" Then
IF hr<>"绿房子" Then
Exit Sub
End if
End If
If pt = "鸟" Then
IF smk<>"PALL MALL" Then
Exit Sub
End if
End If
If smk="PALL MALL" Then
IF pt <> "鸟" Then
Exit Sub
End if
End If
If smk = "DUNHILL" Then
IF hr<>"黄房子" Then
Exit Sub
End if
End If
If hr="黄房子" Then
IF smk <> "DUNHILL" Then
Exit Sub
End if
End If
If drk = "牛奶" Then
IF nm<>3 Then
Exit Sub
End if
End If
If nm=3 Then
IF drk <> "牛奶" Then
Exit Sub
End if
End If
If cty="挪威人" Then
IF nm <> 1 Then
Exit Sub
End if
End If
If nm = 1 Then
IF cty <> "挪威人" Then
Exit Sub
End if
End If
If SMK="BLUE MASTER" Then
IF drk <> "啤酒" Then
Exit Sub
End if
End If
If drk = "啤酒" Then
IF SMK<>"BLUE MASTER" Then
Exit Sub
End if
End If
If cty="德国人" Then
IF smk <> "PRINCE" Then
Exit Sub
End if
End If
If smk = "PRINCE" Then
IF cty<>"德国人" Then
Exit Sub
End if
End If
If NM = 2 Then
IF hr <> "蓝房子" Then
Exit Sub
End if
End If
If hr="蓝房子" Then
IF NM <> 2 Then
Exit Sub
End if
End If
If SMk = "混合" And pt="猫" Then
Exit Sub
End If
If SMk = "混合" And Drk="水" Then
Exit Sub
End If
If pt="马" And SMk = "DUNHILL" Then
Exit Sub
End If
ArrInfo(0,xx) = nm
ArrInfo(1,xx) = cty
ArrInfo(2,xx) = Drk
ArrInfo(3,xx) = Smk
ArrInfo(4,xx) = hr
ArrInfo(5,xx) = pt
ArrInfo(6,xx) = xx
xx = xx + 1
End Sub
Dim n1,n2,n3,n4,n5
n1=0
n2=0
n3=0
n4=0
n5=0
For i = 0 to ubound(arrInfo,2)
For j=0 to 6
'Response.write(arrInfo(j,i)&".")
Next
Select Case arrInfo(0,i)
Case 1
n1 = n1 + 1
Case 2
n2 = n2 + 1
Case 3
n3= n3 + 1
Case 4
n4 = n4 + 1
Case 5
n5 = n5 + 1
End Select
'Response.Write("<br/>")
Next
Dim arrInfo1(),arrInfo2(),arrInfo3(),arrInfo4(),arrInfo5()
Redim arrInfo1(6,n1-1)
Redim arrInfo2(6,n2-1)
Redim arrInfo3(6,n3-1)
Redim arrInfo4(6,n4-1)
Redim arrInfo5(6,n5-1)
x1=0
x2=0
x3=0
x4=0
x5=0
For i = 0 to ubound(arrInfo,2)
Select Case arrInfo(0,i)
Case 1
For j=0 to 6
arrInfo1(j,x1) =arrInfo(j,i)
Next
x1 = x1 + 1
Case 2
For j=0 to 6
arrInfo2(j,x2) =arrInfo(j,i)
Next
x2 = x2 + 1
Case 3
For j=0 to 6
arrInfo3(j,x3) =arrInfo(j,i)
Next
x3 = x3 + 1
Case 4
For j=0 to 6
arrInfo4(j,x4) =arrInfo(j,i)
Next
x4 = x4 + 1
Case 5
For j=0 to 6
arrInfo5(j,x5) =arrInfo(j,i)
Next
x5 = x5 + 1
End Select
Next
For i = 0 to ubound(arrInfo1,2)
For j = 0 to ubound(arrInfo2,2)
For k = 0 to ubound(arrInfo3,2)
For l = 0 to ubound(arrInfo4,2)
For m = 0 to ubound(arrInfo5,2)
If chkR(i,j,k,l,m) = True Then
Response.Write("<br/>==============================================================<br>")
Response.Write(arrInfo1(0,i)&"."&arrInfo1(1,i)&"."&arrInfo1(2,i)&"."&arrInfo1(3,i)&_
"."&arrInfo1(4,i)&"."&arrInfo1(5,i)&"."&arrInfo1(6,i)&"<br>")
Response.Write(arrInfo2(0,j)&"."&arrInfo2(1,j)&"."&arrInfo2(2,j)&"."&arrInfo2(3,j)&_
"."&arrInfo2(4,j)&"."&arrInfo2(5,j)&"."&arrInfo2(6,j)&"<br>")
Response.Write(arrInfo3(0,k)&"."&arrInfo3(1,k)&"."&arrInfo3(2,k)&"."&arrInfo3(3,k)&_
"."&arrInfo3(4,k)&"."&arrInfo3(5,k)&"."&arrInfo3(6,k)&"<br>")
Response.Write(arrInfo4(0,l)&"."&arrInfo4(1,l)&"."&arrInfo4(2,l)&"."&arrInfo4(3,l)&_
"."&arrInfo4(4,l)&"."&arrInfo4(5,l)&"."&arrInfo4(6,l)&"<br>")
Response.Write(arrInfo5(0,m)&"."&arrInfo5(1,m)&"."&arrInfo5(2,m)&"."&arrInfo5(3,m)&_
"."&arrInfo5(4,m)&"."&arrInfo5(5,m)&"."&arrInfo5(6,m)&"<br>")
Response.Write("<br/>================================================================<br>")
Response.Flush()
End If
Next
Next
Next
Next
Next
Function ChkR(i,j,k,l,m)
for n=0 to 6
if arrInfo2(n,j) = arrInfo1(n,i) Or arrInfo3(n,k) = arrInfo1(n,i) Or arrInfo4(n,l) = arrInfo1(n,i) Or arrInfo5(n,m) = arrInfo1(n,i) Then
chkR = False
Exit Function
End If
if arrInfo1(n,i)=arrInfo2(n,j) Or arrInfo3(n,k) = arrInfo2(n,j) Or arrInfo4(n,l) = arrInfo2(n,j) Or arrInfo5(n,m) = arrInfo2(n,j) Then
chkR = False
Exit Function
End If
if arrInfo2(n,j) = arrInfo3(n,k) Or arrInfo1(n,i) = arrInfo3(n,k) Or arrInfo4(n,l) = arrInfo3(n,k) Or arrInfo5(n,m) = arrInfo3(n,k) Then
chkR = False
Exit Function
End If
if arrInfo2(n,j) = arrInfo4(n,l) Or arrInfo3(n,k) = arrInfo4(n,l) Or arrInfo1(n,i) = arrInfo4(n,l) Or arrInfo5(n,m) = arrInfo4(n,l) Then
chkR = False
Exit Function
End If
if arrInfo2(n,j) = arrInfo5(n,m) Or arrInfo3(n,k) = arrInfo5(n,m) Or arrInfo4(n,l) = arrInfo5(n,m) Or arrInfo1(n,i) = arrInfo5(n,m) Then
chkR = False
Exit Function
End If
next
'抽混合烟的人住在养猫人的旁边
If arrInfo1(3,i)="混合" Then
If arrInfo2(5,j) <> "猫" Or arrInfo2(2,j) <> "水" Then
chkR = False
Exit Function
End If
End If
If arrInfo2(3,j)="混合" Then
If arrInfo1(5,i) <> "猫" And arrInfo3(5,k) <> "猫" Then
chkR = False
Exit Function
End If
If arrInfo1(2,i) <> "水" And arrInfo3(2,k) <> "水" Then
chkR = False
Exit Function
End If
End If
If arrInfo3(3,k)="混合" Then
If arrInfo2(5,j) <> "猫" And arrInfo4(5,l) <> "猫" Then
chkR = False
Exit Function
End If
If arrInfo2(2,j) <> "水" And arrInfo4(2,l) <> "水" Then
chkR = False
Exit Function
End If
End If
If arrInfo4(3,l)="混合" Then
If arrInfo3(5,k) <> "猫" And arrInfo5(5,m) <> "猫" Then
chkR = False
Exit Function
End If
If arrInfo3(2,k) <> "水" And arrInfo5(2,m) <> "水" Then
chkR = False
Exit Function
End If
End If
If arrInfo5(3,m)="混合" Then
If arrInfo4(5,l) <> "猫" Then
chkR = False
Exit Function
End If
If arrInfo4(2,l) <> "水" Then
chkR = False
Exit Function
End If
End If
'养马人住在DUNHILL烟的人旁边
If arrInfo1(5,i)="马" Then
If arrInfo2(3,j) <> "DUNHILL" Then
chkR = False
Exit Function
End If
End If
If arrInfo2(5,j)="马" Then
If arrInfo1(3,i) <> "DUNHILL" And arrInfo3(3,k) <> "DUNHILL" Then
chkR = False
Exit Function
End If
End If
If arrInfo3(5,k)="马" Then
If arrInfo2(3,j) <> "DUNHILL" And arrInfo4(3,l) <> "DUNHILL" Then
chkR = False
Exit Function
End If
End If
If arrInfo4(5,l)="马" Then
If arrInfo3(3,k) <> "DUNHILL" And arrInfo5(3,m) <> "DUNHILL" Then
chkR = False
Exit Function
End If
End If
If arrInfo5(5,m)="马" Then
If arrInfo4(3,l) <> "DUNHILL" Then
chkR = False
Exit Function
End If
End If
'绿房子在白房子的左边
If arrInfo1(4,i)="绿房子" Then
If arrInfo2(4,j)<>"白房子" Then
chkR = False
Exit Function
End If
End If
If arrInfo2(4,j)="绿房子" Then
If arrInfo3(4,k)<>"白房子" Then
chkR = False
Exit Function
End If
End If
If arrInfo3(4,k)="绿房子" Then
If arrInfo4(4,l)<>"白房子" Then
chkR = False
Exit Function
End If
End If
If arrInfo4(4,l)="绿房子" Then
If arrInfo5(4,m)<>"白房子" Then
chkR = False
Exit Function
End If
End If
chkR = True
End function
%>
==============================================================
1.挪威人.水.DUNHILL.黄房子.猫.11
2.丹麦人.茶.混合.蓝房子.马.15
3.英国人.牛奶.PALL MALL.红房子.鸟.20
4.德国人.咖啡.PRINCE.绿房子.鱼.50
5.瑞典人.啤酒.BLUE MASTER.白房子.狗.63
================================================================
展开全部
http://hi.baidu.com/kuang/blog/item/4a5c11df1d85e810632798b9.html 这个是我昨天晚上推出来的 没有数学 没有程序 纯逻辑推理 呵呵 顺便说一句 这个题不是考智商的 感觉比的是谁更无聊
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
在一条街上,有5座房子,喷了5种颜色。
2、
每个房子里住着不同国籍的人。
3、
每个人喝不同的饮料,抽不同品牌的香烟,养不同的宠物.
问题是:谁养鱼
2、
每个房子里住着不同国籍的人。
3、
每个人喝不同的饮料,抽不同品牌的香烟,养不同的宠物.
问题是:谁养鱼
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
就是简单推理题而已,没有那么神出奇乎的。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
...德国人!!纯粹浪费时间~!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询