|
??? |
|
Dim a(9) As Integer
Sub Macro1() Cells(1, 1).Value = 0 Call saiki(1) End Sub Sub saiki(ByVal n As Integer) Dim x As Integer, j As Integer a(n) = 1 While a(n) <= 3 x = 3 For j = 1 To n If a(j) = 1 Then x = x + 1 Else x = x - 1 Next j If n < 9 And (0 < x And x < 6) Then Call saiki(n + 1) ElseIf n = 9 And x = 6 Then Cells(1, 1).Value = Cells(1, 1).Value + 1 For j = 1 To 9 Cells(Cells(1, 1).Value, j + 1).Value = a(j) Next j End If a(n) = a(n) + 1 Wend End Sub |
|
1月21日(木) 8:31:26
44072 |