過去ログ

???
Option Explicit
Dim a(10) As Integer
Sub Macro1()
Sheets("Sheet1").Select
Cells(1, 1).Value = 0
Cells(1, 2).Value = 0
Cells(1, 3).Value = "=ABS(A1-B1)"
Range("C1").Select
Call saiki(1)
End Sub
Sub saiki(ByVal n As Integer)
Dim j As Integer
Dim k As Integer
a(n) = 1
While a(n) <= 3
If n < 10 Then
Call saiki(n + 1)
Else
k = 0
For j = 1 To 10
k = k - (a(j) = 1)
Next j
j = 2 - (k Mod 2)
Cells(1, j).Value = Cells(1, j).Value + 1
End If
a(n) = a(n) + 1
Wend
End Sub
   1月17日(木) 10:10:12     40201

過去問題一覧へ戻る