|
- Function getb(a As Long, b As Long) As String
- Dim arr
- arr = Array("整除", "首位循环", "次位循环", "末位循环")
- x = b
- Do While Right(x, 1) = 0
- x = Left(x, Len(x) - 1)
- m = m + 1: n = n + 1
- Loop
- Do While Right(x, 1) = 5
- x = x / 5
- m = m + 1
- Loop
- Do While Right(x, 1) Mod 2 = 0
- x = x / 2
- n = n + 1
- Loop
- ''''''''''
- y = a
- Do While Right(y, 1) = 0
- y = Left(y, Len(y) - 1)
- m = m - 1: n = n - 1
- Loop
- Do While Right(y, 1) = 5
- y = y / 5
- m = m - 1
- Loop
- Do While Right(y, 1) Mod 2 = 0
- y = y / 2
- n = n - 1
- Loop
- m = Application.Max(m, 0)
- n = Application.Max(n, 0)
- If x > 1 Then
- If a Mod x > 0 Then temp = Application.Max(m, n) + 1
- End If
- getb = arr(temp)
- End Function
复制代码
|
|