这个程序如何提高速度?算到10万内居然就需要几个小时呢
Private Sub Command1_Click()'这个程序如何提高速度?算到10万内就需要几个小时呢
Dim a, b
a = Val(Text1)
Do While x <= a
x = x + 1
y = 0
Do While y <= a
y = y + 1
b = x ^ 2 - 2029 * y ^ 2
If b = -487 Then
s = s + 1
js = js & "x=" & x & " y=" & y & vbCrLf
Else
js = js
End If
Loop
Loop
If s > 0 Then
Text2 = js
Else
Text2 = " wu jie"
End If
End Sub
Private Sub Command2_Click()
Text1 = ""
Text2 = ""
End Sub