過去ログ

???
Option Explicit : Const max As Long = 10000
Sub Macro1()
Cells(1, 1).Value = 0
Dim a As Long, b As Long
For a = 1 To max
For b = 1 To max
If ((a + 2) Mod b) + ((b + 1) Mod a) = 0 Then
Cells(1, 1).Value = Cells(1, 1).Value + 1
Cells(Cells(1, 1).Value, 2).Value = a
Cells(Cells(1, 1).Value, 3).Value = b
End If
Next b
Next a
End Sub
   3月26日(木) 10:14:01     43105

過去問題一覧へ戻る