1个回答
展开全部
Sub s()
Const a = "123456789"
For i = 1 To 9
b = Replace(a, i, "")
p b, i, 1, 0
Next
End Sub
Sub p(a, x, k, y)
For i = 1 To Len(a)
xx = Mid(a, i, 1)
yy = y * 10 + Val(xx)
b = Replace(a, xx, "")
Z = x * yy
If Z < 10 ^ k Then
If k = 4 Then
For j = 1 To 4
b = Replace(b, Mid(CStr(Z), j, 1), "")
Next
If b = "" Then
Debug.Print x; "X"; yy; "="; Z
End If
Else
p b, x, k + 1, yy
End If
End If
Next
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询