主题:[原创]难题啊难题啊!!!
LZJQB
[专家分:140] 发布于 2010-11-11 20:05:00
5个连成一串的方格内填入“A”和“B",但“B”不能填在相邻两格里。打出所有的填法和总个数
最后更新于:2010-11-11 20:06:00
回复列表 (共2个回复)
沙发
huangyb731 [专家分:630] 发布于 2010-11-11 22:06:00
林子建
你………………
真贱!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
板凳
LZJQB [专家分:140] 发布于 2010-11-12 18:40:00
CLS
X$(1) = "A"
X$(2) = "B"
FOR A = 1 TO 2
FOR B = 1 TO 2
FOR C = 1 TO 2
FOR D = 1 TO 2
FOR E = 1 TO 2
IF A + B = 4 OR B + C = 4 OR C + D = 4 OR D + E = 4 THEN 1
IF A + B + C + D + E = 5 THEN 1
PRINT X$(A);
PRINT X$(B);
PRINT X$(C);
PRINT X$(D);
PRINT X$(E)
PRINT "-----"
S = S + 1
1 NEXT E
NEXT D
NEXT C
NEXT B
NEXT A
PRINT "S="; S
END
好了,我已经知道了
[em3][em3][em3][em3][em3][em3]
还有 ,
1楼真
是无理!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!![em9][em9][em23][em23][em23][em23][em23][em23][em22][em22][em23][em23][em24][em24][em24][em26][em26][em70][em70][em70]
我来回复