level 6
猴子要从地面上爬上级层阶梯的楼梯他可以一次爬1级,也可以一次爬2级或一次爬三级请问爬上第九级阶梯有几种爬法
2005年08月18日 06点08分
1
level 6
答案请见http://www.phycn.com/me/datacenter.asp?type=4不一定正确
2005年08月18日 06点08分
2
level 0
Private Sub Form_Click()Dim a As IntegerDim b As IntegerDim c As IntegerFor a = 0 To 9For b = 0 To 4For c = 0 To 3If a + b + c = 9 ThenPrint a, b, cEnd IfNext cNext bNext aEnd Sub
2005年08月18日 11点08分
4
level 2
这个行吧Private Function Steps(N As Integer) As IntegerSelect Case NCase 1Steps = 1Case 2Steps = 2Case 3Steps = 4Case ElseSteps = Steps(N - 1) + Steps(N - 2) + Steps(N - 3)End SelectEnd Function
2005年08月18日 12点08分
7
level 2
然后Private Sub Command1_Click()Text1.Text = Steps(9)End Sub答案是149吗?
2005年08月18日 12点08分
8
level 6
Function f1(n As Integer) ReDim a(-2 To n) As Integer For i = 1 To n a(i) = a(i - 1) + a(i - 2) + a(i - 3) If i < 4 Then a(i) = a(i) + 1 Next i f1 = a(n)End Function我的答案
2005年08月19日 00点08分
10