- ©«¤l
- 320
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 310
- ÂI¦W
- 0
- §@·~¨t²Î
- xp
- ³nÅ骩¥»
- 2k
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-6-24
- ³Ì«áµn¿ý
- 2024-12-21
|
Sub GO_______________()
MsgBox Join(¼Æ¦rÂkÃþ(Array(246517, 246518, 246519), 1), vbCrLf)
MsgBox Join(¼Æ¦rÂkÃþ(Array(246299, 246217, 246517, 246518, 246519), 2), vbCrLf)
End Sub
Public Function ¼Æ¦rÂkÃþ(NumAR, ByVal ¦ì¼Æ As Long)
' ¦ì¼Æ need >= 0
Set c_max = CreateObject("Scripting.Dictionary")
Set c_min = CreateObject("Scripting.Dictionary")
For Each n In NumAR
root = n \ (10 ^ ¦ì¼Æ)
n = n Mod (10 ^ ¦ì¼Æ)
If Not c_max.exists(root) Then
c_max(root) = n
c_min(root) = n
End If
If n > c_max(root) Then c_max(root) = n
If n < c_min(root) Then c_min(root) = n
Next
For Each root In c_max
c_max(root) = root & "(" & c_min(root) & "-" & c_max(root) & ")"
Next
¼Æ¦rÂkÃþ = c_max.items
End Function |
|