若正整数A的所有因子(包括1但不包括自身,下同)之和为B,而B的因子之和为A,则称A和B

日期:2014-09-14 15:25:04 人气:1

若正整数A的所有因子(包括1但不包括自身,下同)之和为B,而B的因子之和为A,则称A和B

Private Sub form_Click() Dim i As Integer, j As Integer, k As Integer For i = 1 To 3000 j = facsum(i) k = facsum(j) If i = k And i < j Then Print i; j Next i End Sub Function facsum(n As Integer) As Integer Dim s As Integer s = 0
    A+
热门评论