過去ログ

???
Option Explicit
Sub Macro1()
Cells(1, 1).Value = 0
Dim a As Long
Dim b As Long
Dim c As Long
Dim bc As Long
For a = 1 To Int(1000000 ^ (1 / 3)) + 1
If 1000000 Mod a = 0 Then
bc = 1000000 / a
For b = a To Int(Sqr(bc)) + 1
If bc Mod b = 0 Then
c = bc / b
If b <= c 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
Cells(Cells(1, 1).Value, 4).Value = c
Range("B" & Cells(1, 1).Value).Select
End If
End If
Next b
End If
Next a
Range("A1").Select
End Sub
   3月3日(木) 10:58:17     37489

過去問題一覧へ戻る