過去ログ

???
Sub Macro1()
Cells(1, 1).Value = 0
Dim a As Integer, b As Integer, c As Integer, d As Integer
Dim e As Integer, f As Integer
Dim wa1 As Integer, wa2 As Integer, deta As Integer
For a = 1 To max
deta = 0
If a <> 11 And a <> 12 And a <> 17 And a <> 20 Then
wa1 = a + 11 + 12 + 17 + 20
b = 1
While deta = 0 And b <= max
If a <> b And b <> 11 And b <> 12 And b <> 17 And b <> 20 Then
wa2 = a + b
c = wa2 - 11
If c > 0 And a <> c And b <> c And c <> 11 And c <> 12 And c <> 17 And c <> 20 Then
d = wa2 - 12
If d > 0 And a <> d And b <> d And c <> d And d <> 11 And d <> 12 And d <> 17 And d <> 20 Then
e = wa2 - 17
If e > 0 And a <> e And b <> e And c <> e And d <> e And e <> 11 And e <> 12 And e <> 17 And e <> 20 Then
f = wa2 - 20
If f > 0 And a <> f And b <> f And c <> f And d <> f And e <> f And f <> 11 And f <> 12 And f <> 17 And f <> 20 And wa1 = b + c + d + e + f Then
deta = 1
Cells(1, 1).Value = Cells(1, 1).Value + 1
Cells(Cells(1, 1).Value, 2).Value = "(" & Str(a) & "," & Str(b) & ")"
Cells(Cells(1, 1).Value, 3).Value = "( 11," & Str(c) & ")"
Cells(Cells(1, 1).Value, 4).Value = "( 12," & Str(d) & ")"
Cells(Cells(1, 1).Value, 5).Value = "( 17," & Str(e) & ")"
Cells(Cells(1, 1).Value, 6).Value = "( 20," & Str(f) & ")"
Cells(Cells(1, 1).Value, 7).Value = wa1
Cells(Cells(1, 1).Value, 8).Value = wa2
End If
End If
End If
End If
End If
b = b + 1
Wend
End If
Next a
End Sub
   3月24日(木) 12:24:00     44326

過去問題一覧へ戻る