|
Sub aa()
Range("a1:a65536") = ""
Dim num As Long, arr(1 To 65536) As Long, arr2(1 To 65536, 0) As Long, x As Long
t1 = Timer
For x = 1 To 65536
arr(x) = x
Next x
For x = 1 To 65536
num = Int(Rnd() * (65536 - x) + 1)
arr2(x, 0) = arr(num)
arr(num) = arr(65536 - x + 1)
Next x
Range("a1").Resize(65536) = arr2
MsgBox "运行时间" & Format(Timer - t1, "0.000") & "秒"
End Sub
BY兰色幻想 |
|